From ef90930fa2da6772f9356e3982d61a4d0723ebb7 Mon Sep 17 00:00:00 2001 From: Florian Schaal <info@schaal-24.de> Date: Wed, 15 Feb 2017 13:21:15 +0100 Subject: [PATCH] changed template for nginx + LE --- server/conf/nginx_vhost.conf.master | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 59fac54f2c..0240a8c4ec 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -114,10 +114,18 @@ server { access_log /var/log/ispconfig/httpd/<tmpl_var name='domain'>/access.log combined; ## Disable .htaccess and other hidden files - location ~ /\.(?!well-known/acme-challenge/) { - deny all; - access_log off; - log_not_found off; + location ~ /\. { + deny all; + } + + ## Allow access for .well-known/acme-challenge + location ^~ /.well-known/acme-challenge/ { + access_log off; + log_not_found off; + root /usr/local/ispconfig/interface/acme/; + autoindex off; + index index.html; + try_files $uri $uri/ =404; } location = /favicon.ico { @@ -303,12 +311,6 @@ server { server_name <tmpl_var name='rewrite_domain'>; -location ~ /\.well-known/acme-challenge/ { - root /usr/local/ispconfig/interface/acme/; - index index.html index.htm; - try_files $uri =404; -} - <tmpl_if name='alias_seo_redirects2'> <tmpl_loop name="alias_seo_redirects2"> if ($http_host <tmpl_var name='alias_seo_redirect_operator'> "<tmpl_var name='alias_seo_redirect_origin_domain'>") { -- GitLab