panghaoyu 发表于 2013-09-02 23:38

求教:关于 squid 的 反向代理配置

我在centos5 上运行 squid3.0,希望实现一个 反向代理,

squid.conf的大概配置如下:

http_port 80 defaultsite=xyz.com.cn/Periodical.aspx
cache_peer xyz.com.cn/Periodical.aspx parent 80 0 no-query originserver

我知道 hostname 不能像上面那样写,但我想实现这样的效果。

实际运行报错如下:

ERROR
The requested URL could not be retrieved

--------------------------------------------------------------------------------

The following error was encountered while trying to retrieve the URL: http://xyz.com.cn/Periodical.aspx/

Unable to forward this request at this time.

This request could not be forwarded to the origin server or to any parent caches. The most likely cause for this error is

that the cache administrator does not allow this cache to make direct connections to origin servers, and all configured

parent caches are currently unreachable.

Your cache administrator is root.

--------------------------------------------------------------------------------

其实 URL: http://xyz.com.cn/Periodical.aspx/ 是合法链接,是可以打开的。

有什么办法可以实现 主机名 写成hostname/aaa/xxx.html 之类的效果吗

因为我的很多 cache_peer 只能对应成 hostname/aaa/xxx.html 之类 的形式,而且我的squid服务器只能和一个

dns绑定,我也需要写成这种形式。

谢谢大家的帮助和指点。
页: [1]
查看完整版本: 求教:关于 squid 的 反向代理配置