假如我有 www.a.com , www.b.com 两个网站在同一台 apache 主机上运行,请问我可以通 squid 设置 ,在同一台 apache 主机上做两个网站的反向代理吗?squid 和 apache 是不同一台机子!但两个网站IP 是指向apache服务器的,我用的是 squid 3.0  如果可以,如何设置??  

解决方案 »

  1.   

    问一下大家,请问你们相信下面这样的缘分测试吗?
    www.trip58.com/love/index.php
    我怎么和一个很不相关的人测的结果也很好?
      

  2.   

    反向代理加速配置
    http_port 80 vhost vport 
    cache_peer 61.235.215.129 parent 80 0 no-query originserver name=webname
    cache_peer_domain webname  .webname下面是一个配置文件
    ### proxy port
    http_port 80 vhost vport ### cache directy
    cache_dir ufs /home/data/squid 50000 16 256### cache memory 
    cache_mem 512 MB
    maximum_object_size 1000 KB
    maximum_object_size_in_memory 4096 KB
    cache_swap_low 90
    cache_swap_high 95#### cache log directord
    cache_store_log /home/data/squidlog/store.log 
    cache_access_log /home/data/squidlog/access.log
    cache_log /home/data/squidlog/cache.log### cache user
    cache_effective_user squid
    cache_effective_group squid## cache admin
    visible_hostname image.keyer.com
    cache_mgr [email protected]refresh_pattern -i \.jpg%        1440    98%      1440  
    refresh_pattern -i \.bmp%        1440    98%      1440  
    refresh_pattern -i \.png%        1440    98%      1440
    refresh_pattern -i \.gif%        1440    98%      1440#防止被人利用为HTTP代理,设置允许访问的IP地址
    acl myip dst 61.235.215.129
    http_access deny !myip#2.6的反向代理加速配置
    cache_peer 61.235.215.129 parent 80 0 no-query originserver
    cache_peer_domain image.keyer.com#防止百度机器人爬死服务器
    acl AntiBaidu req_header User-Agent Baiduspider
    http_access deny AntiBaidu#防止天涯盗链,转嫁给百度
    acl tianya referer_regex -i tianya 
    http_access deny tianya 
    deny_info  tianya#限制同一IP客户端的最大连接数
    #acl OverConnLimit maxconn 30 
    #http_access deny OverConnLimitacl all src 0.0.0.0/0.0.0.0
    http_access allow all 
    always_direct allow allacl CactiServer src 127.0.0.1
    acl SNMP snmp_community publicsnmp_port 3401
    snmp_access allow SNMP CactiServer
    snmp_access deny ALL