由 redstar 在 04-20-2004 22:30 发表:
squid奇怪的问题。
http_port 80
forward incoming requests to localhost, port 5180
httpd_accel_host 127.0.0.1
acl acceleratedHost dst 127.0.0.1/255.255.255.255
httpd_accel_port 5180
acl acceleratedPort port 5180
httpd_accel_with_proxy on
acl all src 0.0.0.0/0.0.0.0
acl myNet src 10.0.0.0/255.255.255.0
we don't want to cache localhost: it's a waste of disk space
no_cache deny acceleratedHost
we also don't want requests for localhost passed on to a peer
always_direct allow acceleratedHost
Allow requests when they are to the accelerated machine AND to the
right port
http_access allow acceleratedHost acceleratedPort
http_access allow myNet
cache_effective_user squid
cache_effective_group squid
http_access deny all
#以上是squid.conf的问题。
我在机器上装了tomcat使用5180端口。
装squid想给它做缓存加速。
但是很奇怪,
网页内写成/xxx的连接,都被指向 http://192.168.100.1:5180/xxx
这说明没给做缓存加速?<