From 3e7fbc4c4ac2995644696c2d3223a4dc5468fe43 Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 28 May 2022 12:48:16 +0200 Subject: [PATCH] Update nginx config from example --- nginx_web/nginx.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nginx_web/nginx.conf b/nginx_web/nginx.conf index 803bd81..e0b39f2 100644 --- a/nginx_web/nginx.conf +++ b/nginx_web/nginx.conf @@ -35,23 +35,26 @@ http { root /data/; + # Friendly URL support location / { try_files $uri $uri/ /index.php?route=$uri&$args; } + # Deny access to some file types and directories location ~ \.(tpl|cache|htaccess)$ { return 403; } - location = /robots.txt { - allow all; - log_not_found off; - access_log off; + location ^~ /node_modules/ { + return 403; + } + + location ^~ /scripts/ { + return 403; } location ~ \.php$ { try_files $uri =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /tmp/fastcgi-pass.conf;