file: /hosts/findmeon
content:
include /hosts/findmeon/www.findmeon.com ; #include /hosts/findmeon/www.findmeon.com-downtime ;
when i want to take a domain up/down, i just toggle to comment line
for the include, and restart nginx like magic.
i’m wondering if there is a better way?
ideally i’d like to be able to either have some sort of if/else logic
in nginx , and maybe either a command-line or file based way (this
way kill -HUP still works )
On Fri, Dec 26, 2008 at 1:49 PM, Jonathan V. [email protected]
wrote:
for the pat few years, i have stuff like this:
file: /hosts/findmeon
content:
include /hosts/findmeon/www.findmeon.com ; #include /hosts/findmeon/www.findmeon.com-downtime ;
Is this other config file pointing tosome kind of status page that
says “findmeon.com is down right now!” or something similar? If it
is, you prolly wanna investigate maintenance pages and have them
return 503s during the downtime.
Is this other config file pointing tosome kind of status page that
says “findmeon.com is down right now!” or something similar? If it
is, you prolly wanna investigate maintenance pages and have them
return 503s during the downtime.
would you be able to share those 2 snippets you listed as a pastie
again ? they expired ( as did your old link at http:// forum.engineyard.com/forums/3/topics/22 )
also - just to be sure about this… you’re triggering a downtime
response just by a file-existence check, right?
Yes, it sets up a location that you are most likely never going to use.
It
appears to be convention within nginx configurations. I don’t know when
it
started, but I’ve seen it on this list for some time now. I am pretty
sure
that you could use other special characters if you wanted, too, it’s
just a
character to nginx.
Yes, it sets up a location that you are most likely never going to use.
It appears to be convention within nginx configurations. I don’t know
when it started, but I’ve seen it on this list for some time now. I am
pretty sure that you could use other special characters if you wanted,
too, it’s just a character to nginx.
Igor S refers to these as “named locations”. A common use is e.g.
so that any URLs that would normally go through rewrite stages like
if (! -e $uri) {
rewrite ....;
}
are automatically routed to the appropriate back-end.
In release 0.7.27 Igor S added the try_files directive which works
similarly but adds a list of filesystem locations to try before hitting
a named location as default, and only logs errors in case of total
failure (as I understand it):