Skip to content

Commit ef90930

Browse files
committed
changed template for nginx + LE
1 parent 7668f97 commit ef90930

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

server/conf/nginx_vhost.conf.master

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,18 @@ server {
114114
access_log /var/log/ispconfig/httpd/<tmpl_var name='domain'>/access.log combined;
115115

116116
## Disable .htaccess and other hidden files
117-
location ~ /\.(?!well-known/acme-challenge/) {
118-
deny all;
119-
access_log off;
120-
log_not_found off;
117+
location ~ /\. {
118+
deny all;
119+
}
120+
121+
## Allow access for .well-known/acme-challenge
122+
location ^~ /.well-known/acme-challenge/ {
123+
access_log off;
124+
log_not_found off;
125+
root /usr/local/ispconfig/interface/acme/;
126+
autoindex off;
127+
index index.html;
128+
try_files $uri $uri/ =404;
121129
}
122130

123131
location = /favicon.ico {
@@ -303,12 +311,6 @@ server {
303311

304312
server_name <tmpl_var name='rewrite_domain'>;
305313

306-
location ~ /\.well-known/acme-challenge/ {
307-
root /usr/local/ispconfig/interface/acme/;
308-
index index.html index.htm;
309-
try_files $uri =404;
310-
}
311-
312314
<tmpl_if name='alias_seo_redirects2'>
313315
<tmpl_loop name="alias_seo_redirects2">
314316
if ($http_host <tmpl_var name='alias_seo_redirect_operator'> "<tmpl_var name='alias_seo_redirect_origin_domain'>") {

0 commit comments

Comments
 (0)