squid对https证书的配置

squid要说是一个神级别的软件,其他的代理和反向代理都是弟弟


https_port 443 accel defaultsite=mywebsite.mydomain.com \
  cert=/path/to/wildcardPublicKeyCert.pem \
  key=/path/to/wildcardPrivateKeyCert.pem

# First (HTTP) peer
cache_peer 10.112.62.20 parent 80 0 no-query originserver login=PASS name=websiteA

acl sites_server_1 dstdomain websiteA.mydomain.com
cache_peer_access websiteA allow sites_server_1
http_access allow sites_server_1

# Second (HTTP) peer
cache_peer 10.112.143.112 parent 80 0 no-query originserver login=PASS name=mywebsite

acl sites_server_2 dstdomain mywebsite.mydomain.com
cache_peer_access mywebsite allow sites_server_2
http_access allow sites_server_2

# Third (HTTPS) peer
cache_peer 10.112.90.20 parent 443 0 no-query originserver name=websiteB \
  ssl sslcafile=/path/to/peer/publicCAkey.pem

acl sites_server_3 dstdomain websiteB.mydomain.com
cache_peer_access websiteB allow sites_server_3
http_access allow sites_server_3

# Security block for non-hosted sites
http_access deny all

http://www.squid-cache.org/

https://wiki.squid-cache.org/ConfigExamples#Reverse_Proxy_.28Acceleration.29