我正在试图在Debian上设置Squid,并得到一个连接拒绝错误:
squidclient http://www.apple.com/ > test client: ERROR: Cannot connect to 127.0.0.1:3128: Connection refused
这是我的configuration:
visible_hostname none cache_effective_user proxy cache_effective_group proxy cache_dir ufs /var/spool/squid 2048 16 256 cache_mem 512 MB cache_access_log /var/log/squid/access.log emulate_httpd_log on strip_query_terms off read_ahead_gap 128 Kb collapsed_forwarding on refresh_stale_hit 30 seconds retry_on_error on maximum_object_size_in_memory 1 MB acl all src 0.0.0.0/0.0.0.0 acl purgehosts src 127.0.0.1/255.255.255.255 # Caching static objects in __data is important. # Without that, apache processes sit around spooling static objects. acl QUERY urlpath_regex /cgi-bin/ /_edit /_admin /_login /_nocache /_recache /__lib /__fudge acl PURGE method PURGE acl POST method POST cache deny QUERY cache deny POST http_access allow PURGE purgehosts http_access deny PURGE http_access allow all http_port 127.0.0.1:80 http_port 50.56.206.139:80 cache_peer 127.0.0.1 parent 80 0 originserver no-query no-digest default redirect_rewrites_host_header off read_ahead_gap 128 Kb shutdown_lifetime 5 seconds
任何想法为什么发生这种情况? 我错过了什么?
您的configuration中没有http_port 127.0.0.1:3128 。
编辑:它看起来像你想要反向代理/ http加速器configuration。 在这种情况下,不要用squidclient http://www.apple.com/来testing鱿鱼 – 尝试使用普通的浏览器访问你的网页,或使用像wget这样的工具。
有关信息,请参阅http://wiki.squid-cache.org/SquidFaq/ReverseProxy 。
我没有这种模式在鱿鱼的经验,但删除http_port以外的http_port 50.56.206.139:80 accel defaultsite=your.main.website然后再试一次。
检查这个鱿鱼configuration:
http://www.krizna.com/centos/how-to-install-squid-proxy-on-centos-6/