NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
21.21k stars 2.45k forks source link

mixed content error #1991

Open ghost opened 2 years ago

ghost commented 2 years ago

Hello

Checklist

Describe the bug unfortunately there is a problem with the encryption. a mixed content error appears when installing wordpress and other systems. https://www.lager5.de/blog/wp-admin/install.php see screenshots for more.

Nginx Proxy Manager Version 2.9.18

Screenshots lager5_001

lager5_002

lager5_003

lager5_004

lager5_005

lager5_006

Operating System ubuntu 20.04

does anyone have an idea how to solve the problem?

thanks alex

janxb commented 2 years ago

You are forwarding an HTTPS site to an HTTP backend. The backend is then returning an HTML page with resources which are referenced also by HTTP (unsecured), because the backend thinks that you are accessing it via HTTP.

You can either configure wordpress to overwrite your site URL with HTTPS or to use relative URLs without domain and protocol.

Other solution would be enabling SSL on your backend server, but with a self signed certificate. NPM would then be connecting to your self-signed SSL backend, and be responsible for adding a valid certificate to the user.

gromain commented 2 years ago

@janxb I'm encountering the same issue (not with wordpress though).

However, it works fine on other apps that are redirected to http in the background.

Do you mean this is an upstream issue that should be taken with the app creator?

theraw commented 2 years ago

@am999999999 have you tried to add define('FORCE_SSL_ADMIN', true); to wp-config.php?

github-actions[bot] commented 5 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1:

ernestoacostame commented 2 months ago

Any solution for this? I have the same issue..

user5518 commented 2 months ago
define( 'FORCE_SSL_ADMIN', true );
$_SERVER['HTTPS'] = 'on';

in wp-config.php solved it for me.

Source: https://wordpress.stackexchange.com/questions/260284/wordpress-behind-proxy-mixed-content#comment614428_260293