Why does this URL result in a 400 (Bad Request) error?
John Moore
john at jmsd.co.uk
Wed Nov 4 13:45:24 MSK 2009
Igor Sysoev wrote:
>
> Probably, you set proxy_pass inside "if" block. Could you should this
> configuration part ? I think it can be rewritten without "if".
>
>
>
No, it's not inside an if block. Basically this is how it's configured:
In nginx.conf:
location / {
include /etc/nginx/proxy.conf;
}
proxy.conf:
proxy_pass http://backend;
proxy_pass_header Server;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Original-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Original-Scheme $scheme;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
This works fine. When I append the / to http://backend, I get the error
on starting.
--
===========================================================
John Moore | Norwich, UK | john at jmsd.co.uk | www.jmsd.co.uk
===========================================================
More information about the nginx
mailing list