How to solve nginx reverse proxy mixed content(http, https)

Solution 1:

This worked for nginx https proxy >> nginx http serving Django backend

Inside a location directive:

proxy_set_header X-Forwarded-Proto $scheme;

For more details it's worth to read this excellent article:

Solution 2:

You have to go through the sites' code, and replace all occurences of with either /resource or //

This ensures that all the dependent web page resources are loaded with the same protocol as the website itself is loaded.

Solution 3:

Adding to this apache.conf file fixed my issue

 <IfModule mod_setenvif.c>
  SetEnvIf X-Forwarded-Proto "^https$" HTTPS