mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
LetsEncrypt ACME redirect issue fixes #2881
This commit is contained in:
parent
fa851b61da
commit
013310ded0
@ -1,3 +1,14 @@
|
||||
# Since force-ssl.conf has now moved to the server section it overrides
|
||||
# the LetsEncrypt config which is inside a location section
|
||||
# Set FORCE variable in first two if tests pass and action in the third
|
||||
set $FORCE "";
|
||||
if ($scheme = "http") {
|
||||
return 301 https://$host$request_uri;
|
||||
set $FORCE 'H';
|
||||
}
|
||||
if ($request_uri !~ "^\/.well-known\/acme-challenge\/(.*)") {
|
||||
set $FORCE "${FORCE}D";
|
||||
}
|
||||
# If we are http and outside the LetsEncrypt directories redirect to https via 301
|
||||
if ($FORCE = HD) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
Loading…
Reference in New Issue
Block a user