I have simple LAN-facing Nginx that serves php-based programs located in individual folders. One of these is phpMyAdmin (under document_root/phpMyAdmin) but I'd like to shorten the folder name to "pma". Here's what happens:
* http://192.168.2.1100/pma/ > gives 404
* http://192.168.2.100/phpMyAdmin > shows login page. After login, browser drops to document_root/index.php, showing php status. If I take the browser to previous page (or http://192.168.2.100/phpMyAdmin) then the normal interface (as logged in user) gets displayed.
* How can I make the pma shortcut destination work?
* My nginx.conf:
[code]
http {
index index.htm index.html index.php;
root /http;
server { listen 192.168.2.100:80;
#_security_settings
location ~ \..*/.*\.php$ { return 403; }
location ~ (^|/)\. { return 403; }
location ~ /\. { deny all; }
#_actual_locations
location /pma { internal;
alias /http/phpMyAdmin;
try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ { include fastcgi_params;
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fpm.sock; }
[/code]
* http://192.168.2.1100/pma/ > gives 404
* http://192.168.2.100/phpMyAdmin > shows login page. After login, browser drops to document_root/index.php, showing php status. If I take the browser to previous page (or http://192.168.2.100/phpMyAdmin) then the normal interface (as logged in user) gets displayed.
* How can I make the pma shortcut destination work?
* My nginx.conf:
[code]
http {
index index.htm index.html index.php;
root /http;
server { listen 192.168.2.100:80;
#_security_settings
location ~ \..*/.*\.php$ { return 403; }
location ~ (^|/)\. { return 403; }
location ~ /\. { deny all; }
#_actual_locations
location /pma { internal;
alias /http/phpMyAdmin;
try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ { include fastcgi_params;
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php-fpm.sock; }
[/code]