Author Topic: [BUG] Nginx + Apache Force HTTPS (Redirect Loop)  (Read 480 times)

0 Members and 1 Guest are viewing this topic.

[BUG] Nginx + Apache Force HTTPS (Redirect Loop)
« on: August 12, 2018, 05:05:44 PM »

If you force https in htaccess when you are using Apache+Nginx as reverse proxy you may end up with redirect loop.

Redirect code .htaccess

Code: [Select]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Using the above code will end up with redirect loop

Its because Vhost of nginx ssl is not passing correct parameter for proxy_pass

Right now what we have

Code: [Select]
We need to replace http with https and port 8181 with 8443

Code: [Select]
Restart Nginx

Code: [Select]
service nginx restart