atom feed9 messages in ru.sysoev.nginxtry_files for alias
FromSent OnAttachments
Edho P AriefJun 16, 2009 7:57 pm 
Edho P AriefJun 16, 2009 8:35 pm 
Edho P AriefJun 18, 2009 6:07 am 
Igor SysoevJun 18, 2009 7:10 am 
Edho P AriefJun 18, 2009 7:40 am 
Edho P AriefJun 19, 2009 1:30 am 
Edho P AriefJun 19, 2009 1:33 am 
Edho P AriefJun 19, 2009 7:51 am 
andor.tothApr 9, 2013 7:03 am 
Subject:try_files for alias
From:Edho P Arief (edho@gmail.com)
Date:Jun 16, 2009 7:57:18 pm
List:ru.sysoev.nginx

How do I make this work?

location ~ /~someapp(.*)$ { alias /home/someapp/root$1; try_files $uri /~someapp/err404.htm; }

The try_files never catch the $uri (nor $1) and returns 500 (redirection cycle)

Am I 'forced' to use error_page in this case?

This works:

location ~ /~someapp(.*)$ { alias /home/someapp/root$1; error_page 404 /~someapp/err404.htm; }

and without regex the error_page and try_files seem to be completely ignored: neither location /~someapp/ { alias /home/someapp/root/; error_page 404 /~someapp/err404.htm; } nor location /~someapp/ { alias /home/someapp/root/; try_files $uri /~someapp/err404.htm; } works.