- 论坛徽章:
- 0
|
用Squid做反向加速,给WEB服务器做cache
Squid和后台的WEB服务器是独立的2台服务器
Squid版本是2.6stable6是安装环境是redhat 企业版5,双网卡。并且已经运行,并且能正常cache
Squid监听A网卡所在的网段192.168.1.1:80
Redhat上的apache监听B网卡所在的网段192.168.0.1:80
将cachemgr.cgi拷贝到apache所在的cgi-bin目录
配置cachemgr.conf 为192.168.1.1:80
配置squid.conf
acl managerip src 192.168.1.0/255.255.255.0 192.168.0.0/255.255.255.0
acl manager proto cache_object
cachemgr_passwd 123456 all
http_access allow manager managerip
通过浏览器访问http://192.168.0.1/cgi-bin/cachemgr.cgi出现登陆的页面
选择服务器,输入密码登陆成功,出现Cache Manager menu for 192.168.1.1:的界面
但点击任何一栏都出现类似
ERROR
Cache Manager Access Denied
--------------------------------------------------------------------------------
While trying to retrieve the URL: cache_object://192.168.1.1/ipcache
The following error was encountered:
Cache Manager Access Denied.
Sorry, you are not currently allowed to request:
cache_object://192.168.1.1/ipcachefrom this cache manager until you have authenticated yourself.
You need to use Netscape version 2.0 or greater, or Microsoft Internet Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please contact the cache administrator if you have difficulties authenticating yourself or, if you are the administrator, read Squid documentation on cache manager interface and check cache log for more detailed error messages.
检查日志,发现每当我点分栏的地址的时候,密码都没有继承过去,结果都由于缺乏了密码,导致访问被拒绝
在命令行用squidclient -p 80 mgr:info直接访问提示不能连接loaclhost:80
用squidclient -h 192.168.1.1 -p 80 mgr:info访问 同样出现Cache Manager Access Denied的信息
用squidclient -h 192.168.1.1 -p 80 mgr:info@123456 则成功出现所需要的信息
请问是配置问题么?出在那里?怎么解决?盼复 |
|