From 7b1a9ea1ef51aa71e391c3bbc55f19a04abc26a5 Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Fri, 5 Apr 2024 11:38:33 +0300 Subject: [PATCH] Update nginx.conf --- compilators/debian/nginx/nginx.conf | 32 ++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/compilators/debian/nginx/nginx.conf b/compilators/debian/nginx/nginx.conf index e505f7e..f9122ac 100644 --- a/compilators/debian/nginx/nginx.conf +++ b/compilators/debian/nginx/nginx.conf @@ -88,7 +88,7 @@ http { "~Firefox/((58|59)|([6-9]\d)|([1-9]\d{2,}))\.\d+" 1; } - # Vhost + # Admin Panel server { listen 8443; listen [::]:8443; @@ -133,4 +133,34 @@ http { deny all; } } + + # File manager + server { + listen 8446; + listen [::]:8446; + server_name file_manager; + root /usr/local/phyre/web/thirdparty/filegator/dist; + + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + + index index.php; + charset utf-8; + + error_page 404 /index.php; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + location ~ \.php$ { + fastcgi_pass unix:/run/phyre-php.sock; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + } + } + }