try_files, POST, and redirecting requests to Passenger

António P. P. Almeida appa at perusio.net
Wed Jan 9 15:47:06 UTC 2013


On 9 Jan 2013 15h22 CET, lists at ruby-forum.com wrote:

> "António P. P. Almeida" <appa at perusio.net> wrote in post #1091574:
>> On 9 Jan 2013 00h13 CET, lists at ruby-forum.com wrote:
>>
>> error_page 418 = @idempotent;
>>
>> if ($idempotent) {
>> return 418;
>> }
>>
>> location @idempotent {
>> try_files /maintenance.html @passenger;
>> }
>
> I never knew about the map directive, that's quite interesting. One 
> question though, will this make sure that a POST that hits the 
> error_page 418 stays a POST when it goes through the @idempotent 
> location?

Perhaps I misunderstood. The way it is configured above is such that
the @idempotent location will only be used for GET and HEAD requests.
All other requests are handled by the / location using the lenghty
try_files.

I thought that was your desired config. 

> Thanks for the info!

You're welcome.

--- appa



More information about the nginx mailing list