nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

SSL settings are not applied

Open pikausp opened this issue 6 years ago • 24 comments

Describe the bug SSL settings are not applied when creating a new proxy. The cert is indeed generated and HTTPS is supported, however, settings such as Force SSL do not take effect. I found out when I added a new proxy and tried accessing the site. I was not redirected to HTTPS.

I verified I had not forgotten to check toggle the buttons by creating a new site and verified the same issue occurred. I also checked the id.conf file and things such as including the force SSL file were missing.

Opening the Edit dialog and toggling the options gets the desired results.

The version of NPM I use is 2.0.13

This is the conf file when I checked Force SSL, HTTP/2 Support and HSTS Enabled.

server {
  set $forward_scheme http;
  set $server         "127.0.0.1";
  set $port           81;

  listen 80;
listen 443 ssl http2;

  server_name my.test.domain.com;


  # Let's Encrypt SSL
  include conf.d/include/letsencrypt-acme-challenge.conf;
  include conf.d/include/ssl-ciphers.conf;
  ssl_certificate /etc/letsencrypt/live/npm-4/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/npm-4/privkey.pem;

# Asset Caching
  include conf.d/include/assets.conf;

  # Block Exploits
  include conf.d/include/block-exploits.conf;

  access_log /data/logs/proxy_host-4.log proxy;

  location / {
    # Proxy!
    include conf.d/include/proxy.conf;
  }
}

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Proxy Hosts'
  2. Click on 'Add proxy host'
  3. Fill out the site information
  4. Go to 'SSL' tab
  5. Toggle on Force SSL, HTTP/2 Support, HSTS Enabled

Expected behavior The settings will take effect and the site config will reflect the settings.

Screenshots When I select all those and then go edit the host, the certificate is selected but all the options I checked previously are unchecked image

pikausp avatar Aug 07 '19 12:08 pikausp

I am also experiencing this as well.

nldoty avatar Aug 20 '19 01:08 nldoty

Got the same problem over here. Actually the forwarding works if I specify a path. For example http://domain/path. Without path (http://domain) it still does not work.

Im using NPM version 2.6.2

giomf avatar Nov 11 '20 18:11 giomf

Ok wait. After restarting the Browser everything work fine now.

giomf avatar Nov 11 '20 18:11 giomf

Yes that was my other problem, Firefox's web cache did not play nice with the upgrade and once I cleared it the rest of Web Interface would load.

On Wed, Nov 11, 2020 at 10:34 AM Guillaume Fournier < [email protected]> wrote:

Ok wait. After restarting the Browser everything work fine now.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/184#issuecomment-725589656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2OJUCCEIBMTVV7ZGKIH5LSPLKJ5ANCNFSM4IJ7XGOA .

chris1668 avatar Nov 11 '20 18:11 chris1668

I am also having this issue on NPM 2.3.1

My settings: image

But I can still consistently and on different browsers connect via http. It does not enforce https.

papatistos avatar Dec 30 '20 15:12 papatistos

I am experiencing this on 2.7.1. Https is not enforced even with the switch enabled.

beefycheddar avatar Jan 07 '21 22:01 beefycheddar

Having the same issue on v2.7.3, Force SSL doesn't actually enforce a redirect. Reset your entire browser cache/cookies/etc and try accessing via http directly, it will work even though it shouldn't. If you browser is aware of the https also working it can redirect you without asking (at least Chrome seemingly does), but it's the browser doing the redirect, not NPM. Can be confirmed by resetting the browser.

dnv avatar Jan 26 '21 23:01 dnv

is there an update or workaround on this ?

ma-karai avatar Feb 04 '21 08:02 ma-karai

is there an update or workaround on this ?

My workaround was migrating to Caddy.

dnv avatar Feb 04 '21 10:02 dnv

ok

ma-karai avatar Feb 14 '21 09:02 ma-karai

Possibly related: https://github.com/jc21/nginx-proxy-manager/issues/516

chaptergy avatar May 12 '21 15:05 chaptergy

is this fixed ?

ma-karai avatar Nov 16 '21 05:11 ma-karai

Seems this is still an issue. Opened 07.aug 2019...what?

oaeide avatar Jan 17 '22 04:01 oaeide

still an issue;...

zierbeek avatar Mar 04 '22 16:03 zierbeek

is the team still on active development even?

zierbeek avatar Mar 20 '22 10:03 zierbeek

Still not fixed, but can be circumvent:

  • Create a new proxy host/redirection
  • Edit the proxy: enable Force SSL
  • Clear browser cache/data (or just open an incognito/private session)

It should be redirected to HTTPS now.

I think this is the same issue with https://github.com/NginxProxyManager/nginx-proxy-manager/issues/516

jackblk avatar Mar 23 '22 07:03 jackblk

is there any news in 2023 ?

i still have the same issue :( will have to disable Port 80

Eliam077 avatar May 09 '23 14:05 Eliam077

This is still happening.

realies avatar Dec 03 '23 09:12 realies

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

github-actions[bot] avatar Jul 13 '24 01:07 github-actions[bot]

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

brah.

realies avatar Jul 13 '24 01:07 realies

Still an issue

studio-outsider avatar Apr 05 '25 18:04 studio-outsider

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

github-actions[bot] avatar Oct 17 '25 02:10 github-actions[bot]

I'm seeing this issue

Visualflea avatar Oct 17 '25 14:10 Visualflea

Same issue here

delta0815 avatar Nov 12 '25 11:11 delta0815