[squid-users] reverse proxy and HTTP redirects

Amos Jeffries squid3 at treenet.co.nz
Tue Dec 3 05:32:57 UTC 2019

On 3/12/19 3:46 am, Vieri Di Paola wrote:
> Hi,
> I configured a reverse proxy with something like this:
> https_port accel cert=/etc/ssl/whatever.cer
> key=/etc/ssl/whatever_key_nopassphrase.pem
> tls-dh=/etc/ssl/whatever/dh2048.pem defaultsite=whatever.org

NP: you have not configured any Elliptic Curve to be used, so all those
EC ciphers will not be usable. Also you configured some DES based
ciphers and then disable DES.

> cache_peer parent 8080 0 no-query originserver
> login=PASS front-end-https=on name=httpsServer
> [etc]
> I can load the web portal just fine from a web client connecting to
> However, the web server then sends an HTTP
> redirection to an HTTP URL which is something like
> (in other words, the page is hosted
> on the same server). That breaks the browsing experience (connection
> reset).
> If I can't modify the server code at, is there a
> workaround for this?

You do not need to modify code anywhere.

The problem is that the client is talking to port 50443 and the service
is expecting port 8080 in URLs.

The best solution is to have the server and Squid using the same port
number. Preferably 443 for HTTPS services.

Alternatively you might be able to use the vport= option on https_port
to set the URL port to 8080. However, this affects *all* inbound traffic
at that port and any embedded URLs the service sends the client will
remain broken (contain port 8080).


More information about the squid-users mailing list