diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 59fac54f2c0858ca1fd60ea7999a917eab601c9b..0240a8c4ecc46d6084f0e7d7dc50eaefdf7f9e35 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//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 ; -location ~ /\.well-known/acme-challenge/ { - root /usr/local/ispconfig/interface/acme/; - index index.html index.htm; - try_files $uri =404; -} - if ($http_host "") {