I have some servers where I use an old method of gating a path by using
a file check.
this allows staff to turn off certain locations during
migrations/updates without having root privileges (needed to restart
nginx)
an issue I noticed this method now (perhaps always) shows the name of
the location on the default 404 template [the response that nginx
generates via code, not a template on the fs]
Does anyone know how to disable showing the location without defining a
custom template on the filesystem? or perhaps someone can think of a
better way to accomplish my goals?
On Mon, Jul 11, 2016 at 03:26:30PM -0400, Jonathan V. wrote:
}
404 Not Found
404 Not Found
The resource could not be found.
/@is_running
This is not something nginx generates.
An nginx-generated error will look like:
404 Not Found
404 Not Found
nginx/1.11.3
No location information is added by nginx to error pages, and
never was. You are probably using something with 3rd party
patches. An obvious fix is to switch to using vanilla nginx
instead, it can be downloaded here:
No location information is added by nginx to error pages, and
never was. You are probably using something with 3rd party
patches. An obvious fix is to switch to using vanilla nginx
instead, it can be downloaded here:
On Jul 11, 2016, at 4:25 PM, Oleg A. Mamontov wrote:
=============================================
Thanks to you both!
I spent way more time than I should tracking the issue. I finally
figured it out. Details below:
I am using a non-standard nginx – I run openresty. I thought this
might have been the issue so started creating test-cases to pin down,
and running against all the nginx & openresty versions. I could not
consistently get this to repeat.
The first part of the problem is that I had break on my rewrite,
instead of last.
The second part of my problem, and this is where the confusion
happened – a proxypass was involved
Using last:
what i wanted happened
Using break
the rewrite to /is_running got passed to the proxypass; the
application was creating the error message
the app’s error message template was very similar to nginx – and that
threw me off
i only figured this out, because nginx served an error when the
application was taken offline during an update
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.