PHP can't run under alias folder

Dick Middleton dick at
Sat Jul 18 00:20:05 MSD 2009

Edho P Arief wrote:
> location ~ ^/phpmyadmin/(.*\.php)$ {
>   alias /home/httpd/html/phpmyadmin/$1;
>   fastcgi_pass ...;
>   fastcgi_index ...;
>   include ...;
>   fastcgi_param SCRIPT_FILENAME $request_filename;

The alias directive cannot be used inside a regex-specified location. If you 
need to do this you must use a combination of rewrite and root.

Has this limitation been removed in ?


More information about the nginx mailing list