I've got a problem configuring nginx and apache on a Debian 8 machine. I use nginx s reverse proxy, which is setup to run on HTTPS (and it works like a charm). But, when requests are sent to Apache, the $_SERVER['HTTPS'] is empty, although it should be "ON" (anyway, that's what i'd like to achieve) ? Here is my apache config :
<VirtualHost 127.0.0.1:8080> ServerName shop.mywebsite.com ServerAdmin webmaster@localhost DocumentRoot /var/www_shop ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined LogLevel debug <Directory "/"> Require all granted </Directory> </VirtualHost>
And here is my nginx congif, part on proxy pass :
location ~ \.php { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Original-Request $request_uri; add_header Front-End-Https on; proxy_pass http://127.0.0.1:8080; }
Any help, any clue, appreciated ;) Thanks, Olivier.