Hi,

Le 20/03/2017 à 18:17, Gibson, Brian (IMS) a écrit :
I'm running haproxy 1.7.2 on my development server, and I have this code in to 
redirect traffic to https

http-request redirect code 301 scheme https if  !{ ssl_fc }

The redirect works, but it's generating http code 302 not 301.  At least that's 
what curl is telling me.

curl -I -L http://devurl/
HTTP/1.1 302 Found
Date: Mon, 20 Mar 2017 17:08:05 GMT
Server: Apache/2.4.25 (Unix) OpenSSL/1.0.2k-fips PHP/5.6.30

Here, your redirection is not done by haproxy but by your apache instance.
Without more details about your configuration, it will be difficult to say what's going wrong in it. It's even possible that the request doesn't go through haproxy but goes directly to the apache server.

Do you have enabled logs in haproxy ? Did you have a look at them ?

Please provide your configuration without sensitive data.


Location: https://devurl/
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Mon, 20 Mar 2017 17:08:06 GMT
Server: Apache/2.4.25 (Unix) OpenSSL/1.0.2k-fips PHP/5.6.30
Vary: Accept-Encoding
Last-Modified: Mon, 20 Mar 2017 16:06:58 GMT
Content-Type: text/html
Content-Length: 188
Accept-Ranges: bytes
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=15768000;includeSubDomains

________________________________

Information in this e-mail may be confidential. It is intended only for the 
addressee(s) identified above. If you are not the addressee(s), or an employee 
or agent of the addressee(s), please note that any dissemination, distribution, 
or copying of this communication is strictly prohibited. If you have received 
this e-mail in error, please notify the sender of the error.



--
Cyril Bonté

Reply via email to