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

John Moore john at jmsd.co.uk
Wed Nov 4 13:16:14 MSK 2009


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?


-- 
===========================================================
John Moore | Norwich, UK | john at jmsd.co.uk | www.jmsd.co.uk
===========================================================





More information about the nginx mailing list