mkdir /etc/squid/certs
cd /etc/squid/certs
# Generating the certificate and key
openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -extensions v3_ca -keyout squid-ca-key.pem -out squid-ca-cert.pem
# Copying the key and cert to the same file.
cat squid-ca-cert.pem squid-ca-key.pem >> squid-ca-cert-key.pem
openssl x509 -in squid-ca-cert-key.pem -outform DER -out squidTrusted.der
# squid.conf as https reverse proxy
https_port 8080 accel act-as-origin defaultsite=mid1.now name=server vhost tls-cert=/etc/squid/certs/squid-ca-cert-key.pem
cache_peer 10.0.3.123 parent 443 0 no-query no-digest originserver forceddomain=lopos.now no-netdb-exchange name=loposback
acl port8080 localport 8080
cache_peer_access loposback allow port8080
acl tiles dstdomain .lopos.now
acl tiles dstdomain .mid1.now
http_access allow tiles