From 079b7717173aacbf59c1b418e1cedcb3282c0b69 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 20 Oct 2019 13:17:08 +0200 Subject: [PATCH] Define disable_symlinks nginx config rule globally --- etc/nginx/nginx.conf | 1 + var/www/common.php | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 726af16..ba93b30 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -35,6 +35,7 @@ http { port_in_redirect off; charset UTF-8; index index.html index.htm index.php index.hosting.html; + disable_symlinks if_not_owner; include /etc/nginx/mime.types; default_type application/octet-stream; diff --git a/var/www/common.php b/var/www/common.php index 40b06ea..4dbcc5e 100644 --- a/var/www/common.php +++ b/var/www/common.php @@ -508,7 +508,6 @@ function rewrite_nginx_config(PDO $db){ access_log /home/$tmp[system_account]/logs/access.log custom buffer=4k flush=1m; error_log /var/log/nginx/error_$tmp[system_account].log notice; error_log /home/$tmp[system_account]/logs/error.log notice; - disable_symlinks on from=/home/$tmp[system_account]; autoindex $autoindex; "; if(isset($rewrites[$tmp['id']])){ @@ -542,7 +541,6 @@ function rewrite_nginx_config(PDO $db){ access_log /home/$tmp[system_account]/logs/access.log custom buffer=4k flush=1m; error_log /var/log/nginx/error_$tmp[system_account].log notice; error_log /home/$tmp[system_account]/logs/error.log notice; - disable_symlinks on from=/home/$tmp[system_account]; autoindex $autoindex; "; if(isset($rewrites[$tmp['id']])){