C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

nginx keep_alive setting

November 27, 2016 174 views
Nginx Server Optimization Ubuntu 16.04

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.

Be the first one to answer this question.