diff --git a/conf/nginx.conf b/conf/nginx.conf index 54b5309..6915e58 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location ^~ __PATH__/ { +location __PATH__/ { # Path to source alias __INSTALL_DIR__/; @@ -33,27 +33,27 @@ location ^~ __PATH__/ { } ## disable all access to the following directories - location ^~ __PATH__/config/ { + location ~ ^__PATH__/config/ { deny all; return 403; } - location ^~ __PATH__/tmp/ { + location ~ ^__PATH__/tmp/ { deny all; return 403; } - location ^~ __PATH__/core/ { + location ~ ^__PATH__/core/ { deny all; return 403; } - location ^~ __PATH__/lang/ { + location ~ ^__PATH__/lang/ { deny all; return 403; } - location ~ __PATH__/\.ht { + location ~ ^__PATH__/\.ht { deny all; return 403; } @@ -78,7 +78,7 @@ location ^~ __PATH__/ { } ## properly display textfiles in root directory - location ~__PATH__/(.*\.md|LEGALNOTICE|LICENSE) { + location ~ ^__PATH__/(.*\.md|LEGALNOTICE|LICENSE) { default_type text/plain; }