try_files and a nested location regexp

igorb nginx-forum at nginx.us
Thu Oct 16 11:25:47 UTC 2014


I tried that, but it still does not work. The following config as before
still gives 404 for localhost/x/test.html :

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

        location /x/ {
                alias /test/;
        }

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

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



More information about the nginx mailing list