歡迎您光臨本站 註冊首頁

squid 做反向代理 無法提交post請求,請問如何解決?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

squid 做反向代理 無法提交post請求,請問如何解決?

squid 架在windows下面做反向代理測試一切正常,就是無法提交post請求。
總是提示
The following error was encountered:

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.
《解決方案》

這麼長時間都沒有人回答......

是我的問題太有水平了還是太沒水平了????
《解決方案》

都兩天了。。。。。。。



我在網上搜,有人說squid沒這個功能。但我想這不太可能啊,好多大型網站都用的squid。。。。


繼續等待。。。。。
《解決方案》

你加上
always_direct allow all試試
看你的報錯是禁止轉發功能
《解決方案》

回復 #4 liuhanzhao 的帖子

不行啊,我把配置貼出來給你看看吧。


# 基本acl
acl all src all
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 10.5.15.0/255.255.255.0

# 允許所有訪問
http_access allow all

# 僅僅允許3128到80埠的代理
acl Safe_ports port 3128
acl Safe_ports port 80
http_access allow Safe_ports
http_access allow localnet
acl allow_methods method   GET POST
http_access allow allow_methods
acl buggy_server url_regex ^http://....
broken_posts allow buggy_server
always_direct deny buggy_server
always_direct allow all
header_access All allow all
header_access WWW-Authenticate allow all
header_access Proxy-Authorization allow all
header_access Proxy-Authenticate allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_access Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Pragma allow all
header_access Accept allow all
header_access Accept-Charset allow all
header_access Accept-Encoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Retry-After allow all
header_access Title allow all
header_access Connection allow all
header_access Proxy-Connection allow all

auth_param negotiate children 5
auth_param negotiate keep_alive on

#auth_param ntlm children 5
#auth_param ntlm keep_alive on

auth_param digest children 5
auth_param digest realm Squid proxy-caching web server
auth_param digest nonce_garbage_interval 5 minutes
auth_param digest nonce_max_duration 30 minutes
auth_param digest nonce_max_count 50

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off


# 防止被人利用為HTTP代理,設置允許訪問的IP地址
#acl myip dst 10.5.0.0/32
#http_access deny !myip

# 允許本地管理
#acl manager proto cache_object
#http_access allow manager localhost

# Squid信息設置
visible_hostname 10.5.15.30
cache_mgr pengfei_167@126.com

# 單台使用,不使用該功能
icp_port 0

# 禁止磁碟緩存
cache_dir ufs C:/squid/var/cache 256 16 256

# 禁止緩存本地web server
acl localserver dst 10.5.0.0/32
no_cache deny localserver

# 監聽伺服器的3128埠,透明代理
http_port 10.5.15.30:3128 transparent
prefer_direct on
# web反向代理
# -----------------------------------------------------------------------------
#cache_peer 58.192.114.8    parent 80 0 no-query originserver login=PASS name=bbs
cache_peer 58.192.114.193  parent 80 0 no-query connection-auth=on originserver  name=herald

cache_peer_domain herald 10.5.15.30
cache_peer_access herald allow all
《解決方案》

加入這個,如果是用域名,還要加入域名。你的acl中沒有目的網站
acl mysite dst 58.192.114.193
http_access allow mysite

[ 本帖最後由 iakuf 於 2009-2-2 11:52 編輯 ]

[火星人 ] squid 做反向代理 無法提交post請求,請問如何解決?已經有975次圍觀

http://coctec.com/docs/service/show-post-24710.html