My setup is :
upstream http_backend {
server 127.0.0.1:81;
keepalive 16;
}
server {
...
location / {
proxy_pass http://http_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
But I get a 403
on every page.
If I comment #proxy_set_header Connection "";
pages are loaded. But accordingly to nginx docs, it should be cleared:
For HTTP, the proxy_http_version directive should be set to “1.1” and the “Connection” header field should be cleared:
Is there anything i must set at Apache side so i can set keeplive between nginx (proxy and ssl offloader) and apache (mpm_event and php-fpm)? KeepAlive
is set to On
already.
Ok, the error was I was setting some headers in the
server
block, outsidelocation
, so these were cleared by the newproxy_set_header
directive. I must include them on thelocation
block, like: