- 论坛徽章:
- 0
|
相当郁闷
visible_hostname test.com
http_port 134.234.102.2:81 vhost vport
icp_port 0
cache_mem 200 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 20000 KB
maximum_object_size_in_memory 4096 KB
cache_dir ufs /usr/local/squid/var/cache 10000 16 256
cache_store_log none
emulate_httpd_log on
pid_filename /var/log/squid/squid.pid
cache_log /var/log/squid/cache.log
access_log /var/log/squid/access.log combined
acl all src 0.0.0.0/0.0.0.0
http_access allow all
acl QUERY urlpath_regex cgi-bin .cgi .avi .wmv .rm .ram .mpg .mpeg .zip .exe
cache deny QUERY
#acl picurl url_regex -i \.bmp$ \.png$ \.jpg$ \.gif$ \.jpeg$
#acl mystie1 referer_regex -i aaa
#http_access allow mystie1 picurl
#acl mystie2 referer_regex -i bbb
#http_access allow mystie2 picurl
#acl nullref referer_regex -i ^$
#http_access allow nullref
#acl hasref referer_regex -i .+
#http_access deny hasref picurl
cache_peer 134.234.102.2 parent 80 0 no-query originserver
cache_effective_user nobody
cache_effective_group nobody
(相当郁闷,我按楼主方式配置好squid, 配置文件在上面,然后squid -z 运行成功,但是在cache目录下没有自动生成目录.squid -s,启动成功. test.com已经在hosts里指定 134.234.102.2 test.com .apache我用的80端口.
因为我还有其他项目在服务器上,所以不能改APACHE 80端口,我就让squid用81端口来测试.
然后在本机下配置好hosts,在IE下访问 test.com是OK,但是test.com:81就不能访问. 怎么squid 没有起反向代理的作用呢? 我搞了好久了,希望有能力的朋友帮兄弟看看 . 兄弟在此谢谢了 ~ ^^ ) |
|