mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #228] Force SSL missing when using Custom locations #200
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crawc on GitHub (Nov 4, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/228
Checklist
Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?YES, pulled today.
Are you sure you're not using someone else's docker image?
Yes,
jc21/nginx-proxy-manager:latestIf having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? Not useing Lets Encrypt, but using custom SSL certs.
Describe the bug
After adding a Proxy host using a custom SSL cert (I don't think this matters, but might) with the Force SSL option enabled the site redirects a expected, but when I add a Custom location, with Force SSL still enabled the redirection for HTTP to HTTPS no longer works or these lines are removed.
# Force SSLinclude conf.d/include/force-ssl.conf;These line can be be added back using the Advanced tab as a workaround. It seems the Force SSL is skipped when a Custom location is being used.
v2.0.14To Reproduce
Steps to reproduce the behavior:
data/nginx/proxy_host/1.confExpected behavior
To continue to include the
force-ssl.conffile when a custom location is added.@Kenchava commented on GitHub (Jul 26, 2020):
i just encountered this issue on v2.3.1, I bypassed it by adding the
include conf.d/include/force-ssl.conf;line to the custom configuration of each location, but still kind of annoying...@Anunayj commented on GitHub (Feb 16, 2021):
Is there any reason as to why http-> https rewrite for forced SSL should be in the
location /block and not part of the global server block? (same for HSTS)github.com/jc21/nginx-proxy-manager@301499dc52/backend/templates/proxy_host.conf (L46)Right now it does not work with custom locations because using another
location /block would prioritize it over the first one.@Anunayj commented on GitHub (Feb 16, 2021):
To add to that, there seem to be redundant HSTS entries
github.com/jc21/nginx-proxy-manager@301499dc52/backend/templates/proxy_host.conf (L47)github.com/jc21/nginx-proxy-manager@301499dc52/backend/templates/proxy_host.conf (L13)@chaptergy commented on GitHub (May 11, 2021):
@Anunayj see https://github.com/jc21/nginx-proxy-manager/issues/68#issuecomment-465820723 for his explanation
@henkisdabro commented on GitHub (Jun 9, 2021):
I'm still having troubles with this. Statically hosted files served via NPM render continous 301 redirects unless I disable the checkbox for Force SSL. Even adding in the include line and manually adding the if statement into the custom box, I can't get this to work.
@github-actions[bot] commented on GitHub (Apr 1, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (May 11, 2025):
Issue was closed due to inactivity.