kalinski nginx-forum at
Tue Apr 5 19:52:06 MSD 2011

Hallo Everybody,

I have a working default config,
catching /index.html and /index.php fine
(incl. passing php request to an upstream backend runing php-fpm)

now i want the server to serve requests to
or even just '' 
from /usr/share/phpmyadmin

for static content this should be easy with something like this:

location /phpmyadmin/ {
   alias /usr/share/phpmyadmin/;

and for php?
i tried with a regular expression:

location ~ ^/phpmyadmin/(.*)(\.php)$ {
        #fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_pass   php_fpm_backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME 
        include fastcgi_params;

without success...
it seems as if the static location block catches all and presents the
raw php source to me now...
while i thought that my regex which should match requests to exactly

what would be the best practice to serve stuff like this? alias?
rewrites? regex? try files?

thanks a lot for any help!

Posted at Nginx Forum:,188514,188514#msg-188514

More information about the nginx mailing list