Redirect input http to https

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Redirect input http to https

Patrick Chemla
Hi all,

A lot a very goog people here could help in this:

I have a squid 3.5.20 in front of some backends to balance traffic
according to where the website is.

I have set up certificates on squid for all sites, and backend are
actually accepting traffic both http and https.

On some websites I have set up in Apache parameters a Redirect /
https://www.domain.tld/ and of course, traffic coming in in http is
redirected to https.

I searched for some acl/redirect in squid to force redirecting into
squid and not to have Apache to send this 302 redirect.

Is there a way that Squid will send a 302 redirect to https to all
requests coming in in http?

Many thanks

Patrick


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Redirect input http to https

Amos Jeffries
Administrator
On 27/02/18 03:02, Patrick Chemla wrote:

> Hi all,
>
> A lot a very goog people here could help in this:
>
> I have a squid 3.5.20 in front of some backends to balance traffic
> according to where the website is.
>
> I have set up certificates on squid for all sites, and backend are
> actually accepting traffic both http and https.
>
> On some websites I have set up in Apache parameters a Redirect /
> https://www.domain.tld/ and of course, traffic coming in in http is
> redirected to https.
>
> I searched for some acl/redirect in squid to force redirecting into
> squid and not to have Apache to send this 302 redirect.
>
> Is there a way that Squid will send a 302 redirect to https to all
> requests coming in in http?


There is, same as HTTP redirect.

The best way is like:

 acl redirect_HTTP proto HTTP
 deny_info 302:<a href="https://%H%R">https://%H%R redirect_HTTP
 http_access deny redirect_HTTP


Or with the old URL-rewrite helper interface with a helper that provides
both HTTTP redirect status code and new URL. This is very slightly more
flexible, but quite a lot slower.
 <http://www.squid-cache.org/Doc/config/url_rewrite_program/>

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users