Welcome! Log In Create A New Profile

Advanced

Re: Redirect request based on request type in case of error

Francis Daly
January 10, 2018 06:20AM
On Tue, Jan 09, 2018 at 01:04:22AM -0500, devkuamr wrote:

Hi there,

> I want to redirect GET request to another server in case of errors. I am
> using the below configuration but nginx is having problem while starting
> with this configuration.

> if ($request_method = POST){
> return upstream_status;
> }

> I am getting "invalid return code "upstream_status"" with above
> configuration file.

I don't immediately know about the rest of it, but I suspect there's a
good chance that you want $upstream_status instead of upstream_status.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Redirect request based on request type in case of error

devkuamr January 09, 2018 01:04AM

Re: Redirect request based on request type in case of error

Francis Daly January 10, 2018 06:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready