打印

關于SQUID緩存web的問題

關于SQUID緩存web的問題

[code:1]
http_port 80
httpd_accel_host 172.16.146.244
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_with_proxy off
httpd_accel_uses_host_header off

cache_mem 128 MB
#maximum_object_size 4096 KB
#cache_dir ufs /usr/local/squid/var/cache 128 16 256
#cache_effective_user squid

acl all src 0.0.0.0/0.0.0.0
http_access allow all
icp_access allow all
#dns_testnames netscape.com internic.net nlanr.net microsoft.com[/code:1]

打開出錯


[code:1]
ERROR
The requested URL could not be retrieved

While trying to process the request:

GET / HTTP/1.1
Host: 172.16.146.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: x-gbk,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0



The following error was encountered:

    * Invalid Request

Some aspect of the HTTP Request is invalid. Possible problems:

    * Missing or unknown request method
    * Missing URL
    * Missing HTTP Identifier (HTTP/1.0)
    * Request is too large
    * Content-Length missing for POST or PUT requests
    * Illegal character in hostname; underscores are not allowed

Your cache administrator is webmaster. [/code:1]

謝謝 ········是什么原因```````
socket754 2.1GHz Epox 8KDA3I 2G Infineon DDR400 Leadtek A6600GT adaptec 29160 seagate 10K.7 73G Maxtor 160G SATA Ie4 & Mx500

TOP

dns都没有打开,把dns前面的注释去掉,squid一般监听的是8080端口,换一下看看
另外有点看不懂你这是想做透明代理还是想干什么
你的iptables又是怎么设置的?
这段错误代码是在服务器端的吗?
........
问题多多

TOP

就是我想在apache服务器前面加一个squid缓存``````
squid在172.16.146.1
apache在172.16.146.244

squid按照上面的配置文件运行以后

访问172.16.146.1:80就出现上面的出错信息````````
dnsteam不是 用来测试连通性的么?另外他本来就是注释掉的,我只是顺便复制过来,并且我的访问完全基于IP直接访问,没有用域名 ···
socket754 2.1GHz Epox 8KDA3I 2G Infineon DDR400 Leadtek A6600GT adaptec 29160 seagate 10K.7 73G Maxtor 160G SATA Ie4 & Mx500

TOP


原来你是用squid做网关
你访问squid的80端口,本来是想访问内网中的apache对不对?
那你在iptables那里有没有做端口映射?

TOP

已經搞明白了``我上面的是2.5的選項, 我用的是2.6 修改了一些選項``文檔里面看到``
已經搞掂```````
socket754 2.1GHz Epox 8KDA3I 2G Infineon DDR400 Leadtek A6600GT adaptec 29160 seagate 10K.7 73G Maxtor 160G SATA Ie4 & Mx500

TOP