8 comments

[ 1.4 ms ] story [ 35.6 ms ] thread
After an upgrade to 1.8.1 our rewrites (alias+regexp+try_files) stopped working.
Related to this?

*) Bugfix: the "try_files" directive inside a nested location given by a regular expression worked incorrectly if the "alias" directive was used in the outer location. from: http://nginx.org/en/CHANGES-1.8

Yes, probably related. I reported it here: https://forum.nginx.org/read.php?11,264181
From my read of the docs, try_files expands aliases, so the alias directives in your location blocks are unnecessary, causing nginx to look for /home/mysite/www/js/js/whatever.js
You're right, thank you. The aliases are completely useless. It's just strange to introduce such a change in a "stable" release.
Related, can anyone explain why nginx uses its own resolver instead of the system one?
I have no idea if it's substantiated but I've read accusations that it's so you'll pay for the commercial version. Apparently the open source version ignores the TTL and just caches it until you restart the process.
I think it's because the system DNS can block under some conditions. That's death for nginx, which can't afford to spin up a thread per request.