Author Topic: (nginx > apache) or (nginx > varnish > apache) Proxy SSL Issue  (Read 6778 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
(nginx > apache) or (nginx > varnish > apache) Proxy SSL Issue
« on: December 01, 2017, 08:04:13 AM »
For anyone having an issue with proxy setup here is a solution for instance where apache isn't detecting that nginx received the request over ssl. It's happening because nginx isn't forwarding the protocol header so apache always things that the request is coming over http.

This affects both (nginx > apache) or (nginx > varnish > apache)

Add following line to /etc/nginx/proxy.inc


proxy_set_header X-Forwarded-Proto $scheme;
« Last Edit: December 01, 2017, 08:06:20 AM by JAYC »

Offline
*
Re: (nginx > apache) or (nginx > varnish > apache) Proxy SSL Issue
« Reply #1 on: December 01, 2017, 09:26:24 AM »
Oh and don't forget to restart nginx after making this change.

Offline
*
Re: (nginx > apache) or (nginx > varnish > apache) Proxy SSL Issue
« Reply #2 on: December 02, 2017, 03:06:49 PM »
Ohh! Thank you.
Thats worked for me.