Performance question regarding regex

panni nginx-forum at
Fri Jul 30 03:44:54 MSD 2010

Hey, thank you for your answer.

try_files only seems to hit when a root directive is set in the config.
try_files only works on /home/www$uri files, not on /www/html$uri
Is this intended? How can I make it work when a file called
/www/html/asdf.php is requested by /asdf.php?

location / {
            root /home/www;
            try_files $uri "/www/html$uri" @ksphp;

            if ($request_filename ~* \.(js|css)$) {
                return 404;

            index index.php;
            expires 30d;

Thank you!

Posted at Nginx Forum:,109438,114603#msg-114603

More information about the nginx mailing list