歡迎您光臨本站 註冊首頁

squid2.6反向代理HTTPS的問題求救

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

squid2.6反向代理HTTPS的問題求救

經過多次測試,SQUID反向代理HTTPS仍然不能成功,痛苦啊,
我是這樣。用CENTOS的系統,SQUID配置如下:

https_port 443 defaultsite=test.com cert=/etc/squid/eric.pem key=/etc/squid/key.pem vhost
cache_peer ×。×。×。× parent 443 0 no-query ssl sslflags=DONT_VERIFY_PEER originserver name=test
cache_peer_domain test test.com
cache_peer_access test allow all


我的證書是直接從我後台網站導出來為PFX的格式的。通過指令
openssl pkcs12 -in test.com.pfx -out cert.pem -nodes
openssl pkcs12 -in 21mmo.pfx -out key.pem -nodes


這樣方法是不成功的。每次訪問跳到HTTPS訪問回錯誤了。。
ERROR
The requested URL could not be retrieved

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

While trying to retrieve the URL: https://test.21mmo.com/

The following error was encountered:

Connection to 121.*.*.* Failed
The system returned:

    (71) Protocol error

The remote host or network may be down. Please try the request again.

Your cache administrator is root.

百思不得其解。痛苦

http://wiki.squid-cache.org/ConfigExamples/SslReverseProxyWithWildcardCertifiate?highlight=%28https%29
看到官方網站的指南,上面寫的證書好像不需要直接拿真正的證書來做的。。我想請問下各位是這樣嗎?還是自己在本機隨機產生就行了。訪問的時候通過中繼就行了。還有就是請教如是是按照我的方法。還有我轉換證書的方法是不是對的??謝謝各位了
《解決方案》

關注一下,希望有人寫個文檔出來。
《解決方案》

頂一下.

怎樣用nginx 反向代理 https(tomcat)?
《解決方案》

回復 #3 xi2008wang 的帖子

已解決, 將tomcat(keytool)生成的keystore轉換成標準格式

[ keysotre --> cert.pem ]
keytool -export -alias cas -keystore .keystore -file server.crt
openssl x509 -out cert.pem -outform pem -text -in server.crt -inform der

[ keystore --> cert.key ]
java -jar ExportPrivateKey.zip .keystore JKS changeit cas export.key
openssl pkcs8 -inform PEM -nocrypt -in export.key -out cert.key

[火星人 ] squid2.6反向代理HTTPS的問題求救已經有550次圍觀

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