Performance question regarding regex

panni nginx-forum at nginx.us
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
files.
Is this intended? How can I make it work when a file called
/www/html/asdf.php is requested by /asdf.php?

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

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

            index index.php;
            expires 30d;
        }
[/code]

Thank you!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,109438,114603#msg-114603




More information about the nginx mailing list