Skip to content

How to allow non standard HTTP(S) ports through Squid?

In default installation Squid does not allow HTTP or HTTPS connections to non standard ports (defaults for HTTP is port 80 and for HTTPS port 443). If you try to connect to URLs like http://www.example.com:8080 or https://www.example.com:8443 your browser will show the Access Denied page.

ERROR
The requested URL could not be retrieved

The following error was encountered while trying to retrieve
the URL: www.example.com:8443

    Access Denied.

Access control configuration prevents your request from 
being allowed at this time. Please contact your service provider 
if you feel this is incorrect.

Your cache administrator is webmaster.

In order to allow connections to non standard ports add the required port number to Admin UI / Squid Proxy / Settings / Default ACLs tab, fields Additional SSL Ports and Additional Safe Ports (both) as indicated on the following screenshot. If you have multiple ports, separate them by space.

Allow Connections to Non Standard Ports in Squid

Click Save Changes and then Save and Restart in the top right corner. Admin UI will generate something like the following lines in Squid configuration file.

...
acl SSL_ports port 8443
...
acl Safe_ports port 8443
...

Connections to non standard ports shall now be allowed.