Welcome! Log In Create A New Profile

Advanced

Re: Why does this URL result in a 400 (Bad Request) error?

November 04, 2009 05:30AM
On Wed, Nov 04, 2009 at 10:16:14AM +0000, John Moore wrote:

> Igor Sysoev wrote:
> >
> > If you set
> >
> > location / {
> > proxy_pass http://tomcat;
> > }
> >
> > then nginx passes a unchanged original client request, however, if you set
> >
> > location / {
> > proxy_pass http://tomcat/;
> > }
> >
> > then nginx passes unescaped and then escaped again request,
> > So "+" and "/" will be unescaped in this case.
> >
> >
> >
> Thanks. I'm using the upstream module, so what I had was this:
>
> proxy_pass http://backend;
>
> I changed it to
>
> proxy_pass http://backend/;
>
> The result was this:
>
> Starting nginx: 2009/11/04 11:12:12 [emerg] 2272#0: "proxy_pass" may not
> have URI part in location given by regular expression, or inside named
> location, or inside the "if" statement, or inside the "limit_except"
> block in /etc/nginx/proxy.conf:1
>
> What have I done wrong?

Probably, you set proxy_pass inside "if" block. Could you should this
configuration part ? I think it can be rewritten without "if".


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Why does this URL result in a 400 (Bad Request) error?

John Moore November 03, 2009 03:14PM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 03, 2009 04:18PM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 03, 2009 04:50PM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 03, 2009 04:56PM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 03, 2009 05:02PM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 03, 2009 05:20PM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 04:48AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 05:00AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 05:20AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 05:30AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 05:58AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 06:18AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 06:50AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 07:00AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 07:20AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 07:38AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 07:30AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 07:38AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 08:18AM

Re: Why does this URL result in a 400 (Bad Request) error?

Igor Sysoev November 04, 2009 08:44AM

Re: Why does this URL result in a 400 (Bad Request) error?

John Moore November 04, 2009 08:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
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