Squid3 Reverse Proxy - how do I redirect ALL HTTP requests to HTTPS
-
Good Afternoon,
I have a squid reverse proxy set up to listen on port 80 & 443. I want to forward all port 80 requests to 443.
Currently, for example I have:
a.example.com
b.example.com
c.example.comIf I set up a redirect mapping for a.example.com:
Redirect Protocol: HTTP
Blocked Domains: a.example.com
Path Regex: ^/$
URL to Redirect To: https://^/$This works to redirect a.example.com and http://a.example.com to https://a.example.com.
This however, does not redirect a.example.com/directory.Ideally I'd like to put something like .example.com/ and redirect whatever the user inputs to use SSL.
What am I missing!?
-
Squid3 reverse proxy doesn't allow for keeping the path currently. If you setup a redirect from http://mydomain.com/page.html to https://mydomain.com/page.html then you're better off setting some kind of javascript script. You can use apache to redirect and keep the path, but in order to do so you will need to turn off ssl offloading off for that site.
Also of note because of how Squid3 works if you want to use PHP it won't work. This is because squid uses HTTP to connect to your webserver, unless you use SSL passthrough which something I can't figure out for pfSense, but I know is possible with the version of Squid3 that pfSense has as a package based on the squid3 documentation.