Not redirecting acme-challange url
This commit is contained in:
@@ -514,7 +514,19 @@ server {
|
|||||||
listen [::]:80 {{ $default_server }};
|
listen [::]:80 {{ $default_server }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
|
# Allow acme challenge requests without redirect
|
||||||
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
allow all;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
try_files $uri =404;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Redirect all other requests to HTTPS
|
||||||
|
location / {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user