免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1262 | 回复: 0
打印 上一主题 下一主题

[其他] 求教:关于 squid 的 反向代理配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-09-02 23:38 |只看该作者 |倒序浏览
我在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绑定,我也需要写成这种形式。

谢谢大家的帮助和指点。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP