Hello, could somebody give me a clear explanation for these Nginx config
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
i have read the nginx documentation but some details explanation would be very much appreciated. like its not clear to me that i should use them only when im using upstream or even when using unix socket.
also if im using php, above will go into location php, right?
location ~ \.php$ {
. . .
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
. . .
}
thanks in advance.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
I don’t think that the full set of headers is required for a unix socket. This guide provides some great examples of using nginx with fastCGI for PHP.