Evidently the examples I found were all for earlier versions of squid.
For this problem, my main takeaway was that cert=
and key=
in the https_port
config line are no longer correct and we need to use tls-cert=
and tls-key=
instead.
So (for Squid v4.15) I just need the webserver certificate and its private key, and these lines in squid.conf:
https_port 1.2.3.4:443 accel defaultsite=mysite.com tls-cert=/etc/squid/myserver.pem
cache_peer 1.2.4.8 parent 443 0 no-query originserver login=PASS ssl
This works for a .PEM which includes the certificate and the unencrypted private key. If the key is in a separate file, this should work:
https_port 1.2.3.4:443 accel defaultsite=mysite.com tls-cert=/etc/squid/myserver.pem tls-key=/etc/squid/myserver.key
cache_peer 1.2.4.8 parent 443 0 no-query originserver login=PASS ssl
If that key is encrypted, you'll either need to start squid manually (eg run squid -N
in a screen
session) or add an sslpassword_program
config line to provide the PEM passphrase.
NB:
I found that an http_port config line (eg http_port 3128
) was still required for squid to start up.
All the configuration file directives are documented here: http://www.squid-cache.org/Doc/config/