Display configuration at runtime?

Jim Ohlstein jim at ohlste.in
Mon Apr 16 21:38:38 UTC 2012

Jim Ohlstein
On Apr 16, 2012 5:15 PM, "michael_teter" <nginx-forum at nginx.us> wrote:
> Howdy.
> I'm working on setting up a maintenance page, and I can't figure out
> where Nginx is looking for the maintenance.html that I have specified.
> I've tried placing the file in a lot of different locations, but I still
> get the generic "503 Service Temporarily Unavailable" page.

What does the error log show?

If you use something like:

location / {
   root /some/path;
   try_files maintenance.html $uri $uri/;

then nginx will look for maintenance.html in the root directory and serve
it if it's present.

So to put our sites into maintenance mode, we simply copy our
maintenance.html into the root directory. No need to reload nginx. When
we're ready to go back up, the file is removed.

> My question is, is there a way I can get Nginx to display it's
> configuration at run-time, so perhaps I can determine where it is
> looking for the file?
> Thanks in advance,
> Michael
> Posted at Nginx Forum:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120416/a2cc1522/attachment-0001.html>

More information about the nginx mailing list