I tried to add explicit alias to the regexp location:

server {
        listen 8080 default_server;
        root /usr/share/nginx/html;
        autoindex on;

        location /x/ {
                alias /test/;
        }

        location ~ ^/x/(test.*)$ {
                alias /test/$1;
                try_files $uri =404;
        }
}

However that still gives 404 for localhost/x/test.html . Does that mean that
try_files cannot be used at all in a regexp location defined with an alias,
it only works if the location uses the root directive?

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to