Просмотр исходного кода

2664 [Bug] File Manager under Development Mode (#2682)

* Update nginx.conf to resolve issues with Filemanger in development mode

https://serverfault.com/questions/694449/php-in-nginx-directory-alias-not-working

* Update hestia-nginx version
Jaap Marcus 3 лет назад
Родитель
Сommit
2e6e406118
2 измененных файлов с 8 добавлено и 1 удалено
  1. 1 1
      src/deb/nginx/control
  2. 7 0
      src/deb/nginx/nginx.conf

+ 1 - 1
src/deb/nginx/control

@@ -1,7 +1,7 @@
 Source: hestia-nginx
 Package: hestia-nginx
 Priority: optional
-Version: 1.22.0
+Version: 1.23.0
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com

+ 7 - 0
src/deb/nginx/nginx.conf

@@ -133,6 +133,13 @@ http {
         location /fm/ {
             alias /usr/local/hestia/web/fm/dist/;
             index index.php;
+            location ~ /([^/]+\.php)$ {
+                try_files /$1 =404;
+                fastcgi_pass    unix:/var/run/hestia-php.sock;
+                fastcgi_index index.php;
+                include fastcgi_params;
+                fastcgi_param SCRIPT_FILENAME /usr/local/hestia/web/fm/dist/index.php;
+            }
         }
 
         location ~ \.php$ {