From 380b8cc6f60742e3b83fdfbad3147c54235449bf Mon Sep 17 00:00:00 2001 From: finnie2006 <57916807+finnie2006@users.noreply.github.com> Date: Tue, 4 Oct 2022 19:17:31 +0200 Subject: [PATCH] Update default.conf --- nginx/conf.d/default.conf | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index f04c462..91ebf44 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -1,16 +1,16 @@ server { - listen 80; + listen 2006; server_name ""; #access_log /home/container/naccess.log; #error_log /home/container/nerror.log error; root /home/container/webroot; - index index.html index.htm index.php; + index index.php index.html; charset utf-8; location / { - try_files $uri $uri/ /index.php?$query_string; + try_files $uri $uri/ /index.php?route=$uri&$args; } location = /favicon.ico { access_log off; log_not_found off; } @@ -37,6 +37,19 @@ server { fastcgi_send_timeout 300; fastcgi_read_timeout 300; } + + location ~ \.(tpl|cache|htaccess)$ { + return 403; + } + + location ^~ /node_modules/ { + return 403; + } + + location ^~ /scripts/ { + return 403; + } + location ~ /\.ht { deny all;