mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-22 21:08:13 -05:00
Bypass basic auth for letsencrypt acme requests, reload nginx after ssl renewals
This commit is contained in:
parent
b324110c49
commit
36896bcfc9
@ -30,7 +30,11 @@ const internalSsl = {
|
|||||||
.then(result => {
|
.then(result => {
|
||||||
logger.info(result);
|
logger.info(result);
|
||||||
internalSsl.interval_processing = false;
|
internalSsl.interval_processing = false;
|
||||||
|
|
||||||
|
return internalNginx.reload()
|
||||||
|
.then(() => {
|
||||||
return result;
|
return result;
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
logger.error(err);
|
logger.error(err);
|
||||||
|
@ -20,14 +20,13 @@ server {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/<%- hostname %>/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/<%- hostname %>/privkey.pem;
|
||||||
<% } -%>
|
<% } -%>
|
||||||
|
|
||||||
<% if (typeof access_list_id !== 'undefined' && access_list_id) { -%>
|
|
||||||
auth_basic "Authorization required";
|
|
||||||
auth_basic_user_file /config/access/<%- access_list_id %>;
|
|
||||||
<% } -%>
|
|
||||||
|
|
||||||
<%- typeof advanced !== 'undefined' && advanced ? advanced : '' %>
|
<%- typeof advanced !== 'undefined' && advanced ? advanced : '' %>
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
<% if (typeof access_list_id !== 'undefined' && access_list_id) { -%>
|
||||||
|
auth_basic "Authorization required";
|
||||||
|
auth_basic_user_file /config/access/<%- access_list_id %>;
|
||||||
|
<% } -%>
|
||||||
<%- typeof force_ssl !== 'undefined' && force_ssl ? 'include conf.d/include/force-ssl.conf;' : '' %>
|
<%- typeof force_ssl !== 'undefined' && force_ssl ? 'include conf.d/include/force-ssl.conf;' : '' %>
|
||||||
include conf.d/include/proxy.conf;
|
include conf.d/include/proxy.conf;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
|
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
|
||||||
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
|
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
|
||||||
location ^~ /.well-known/acme-challenge/ {
|
location ^~ /.well-known/acme-challenge/ {
|
||||||
|
auth_basic off;
|
||||||
|
|
||||||
# Set correct content type. According to this:
|
# Set correct content type. According to this:
|
||||||
# https://community.letsencrypt.org/t/using-the-webroot-domain-verification-method/1445/29
|
# https://community.letsencrypt.org/t/using-the-webroot-domain-verification-method/1445/29
|
||||||
|
Loading…
Reference in New Issue
Block a user