@@ -26,6 +26,7 @@ server {
2626 # Tools (phpMyAdmin, TinyFileManager, etc.) are in /var/www/admin/tools/
2727 # and accessed via location blocks below
2828 root /var/www/admin/control-panel;
29+ index index.html index.php;
2930
3031 # Admin Control Panel Protection
3132 # Adds a basic authentication prompt to the admin control panel.
@@ -48,7 +49,7 @@ server {
4849
4950 # EngineScript Control Panel - Default Location (Landing Page)
5051 location / {
51- try_files $uri $uri/ /index.html =404 ;
52+ try_files $uri $uri/ /index.html;
5253 }
5354
5455 # API Endpoints for EngineScript Control Panel
@@ -65,79 +66,77 @@ server {
6566 # Admin Tools - Separate directory from control panel
6667 # Tools are stored in /var/www/admin/tools/ to prevent
6768 # EngineScript updates from overwriting tool configurations
69+ #
70+ # Uses root (not alias) so nested PHP locations resolve
71+ # SCRIPT_FILENAME and try_files correctly against the tools
72+ # directory without overriding the shared php-fpm.conf include.
6873 # ============================================================
6974
7075 # phpMyAdmin - Database management tool
7176 location /phpmyadmin {
72- alias /var/www/admin/tools/phpmyadmin ;
77+ root /var/www/admin/tools;
7378 index index.php;
7479
7580 location ~ \.php$ {
7681 fastcgi_split_path_info ^(.+\.php)(/.+)$;
77- fastcgi_param SCRIPT_FILENAME $request_filename;
7882 include /etc/nginx/globals/php-fpm.conf;
7983 }
8084 }
8185
8286 # TinyFileManager - File management tool
8387 location /tinyfilemanager {
84- alias /var/www/admin/tools/tinyfilemanager ;
88+ root /var/www/admin/tools;
8589 index tinyfilemanager.php;
8690
8791 location ~ \.php$ {
8892 fastcgi_split_path_info ^(.+\.php)(/.+)$;
89- fastcgi_param SCRIPT_FILENAME $request_filename;
9093 include /etc/nginx/globals/php-fpm.conf;
9194 }
9295 }
9396
9497 # phpSysInfo - System information tool
9598 location /phpsysinfo {
96- alias /var/www/admin/tools/phpsysinfo ;
99+ root /var/www/admin/tools;
97100 index index.php;
98101
99102 location ~ \.php$ {
100103 fastcgi_split_path_info ^(.+\.php)(/.+)$;
101- fastcgi_param SCRIPT_FILENAME $request_filename;
102104 include /etc/nginx/globals/php-fpm.conf;
103105 }
104106 }
105107
106108 # phpinfo - PHP information page
107109 location /phpinfo {
108- alias /var/www/admin/tools/phpinfo ;
110+ root /var/www/admin/tools;
109111 index index.php;
110112
111113 location ~ \.php$ {
112114 fastcgi_split_path_info ^(.+\.php)(/.+)$;
113- fastcgi_param SCRIPT_FILENAME $request_filename;
114115 include /etc/nginx/globals/php-fpm.conf;
115116 }
116117 }
117118
118119 # Adminer - Lightweight database management tool
119120 location /adminer {
120- alias /var/www/admin/tools/adminer ;
121+ root /var/www/admin/tools;
121122 index index.php;
122123
123124 location ~ \.php$ {
124125 fastcgi_split_path_info ^(.+\.php)(/.+)$;
125- fastcgi_param SCRIPT_FILENAME $request_filename;
126126 include /etc/nginx/globals/php-fpm.conf;
127127 }
128128 }
129129
130130 # OpCache GUI - PHP OpCache status and management
131- location /opcache-gui {
132- alias /var/www/admin/tools/opcache-gui;
133- index index.php;
134-
135- location ~ \.php$ {
136- fastcgi_split_path_info ^(.+\.php)(/.+)$;
137- fastcgi_param SCRIPT_FILENAME $request_filename;
138- include /etc/nginx/globals/php-fpm.conf;
139- }
140- }
131+ #location /opcache-gui {
132+ #root /var/www/admin/tools;
133+ #index index.php;
134+
135+ #location ~ \.php$ {
136+ #fastcgi_split_path_info ^(.+\.php)(/.+)$;
137+ #include /etc/nginx/globals/php-fpm.conf;
138+ #}
139+ #}
141140
142141 # PHP processing for control panel root
143142 location ~ \.php$ {
0 commit comments