Nginx virtual host ordering - The Misadventures of a Pagan Geek

<![endif] The Misadventures of a Pagan Geek Tech, Fun and all things Quirky… #masthead Skip to content Home About Me #access #branding #header ← Case Study: Optimising a Cloud Application Bash Tip #1 → #nav-above Posted on November 25, 2011 | Comments Off on Nginx virtual host ordering .entry-meta Just a quick note. Nginx will include configuration files based on ASCII ordering. This means that even if you have two files default (with the default config) and cloud, cloud will be included before default and will answer for any undefined hostnames. The easy way to solve this (and obvious if you have been around Linux for a while) is to prefix all config files with a number. For example: 00-default 10-wildcard.example.com 10-wildcard.foo.com This will result in 00-default being included in the configuration first. I hope this is useful for som...

Linked on 2016-07-26 20:13:22 | Similar Links