Welcome! Log In Create A New Profile

Advanced

Nginx proxy_pass HTTPS/SSL/HTTP2 keepalive

February 24, 2017 05:07AM
So the Nginx documentation says this http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

For HTTP, the proxy_http_version directive should be set to “1.1” and the “Connection” header field should be cleared:

upstream http_backend {
server 127.0.0.1:8080;

keepalive 16;
}

server {
...

location /http/ {
proxy_pass http://http_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
...
}
}


But does it also apply for HTTPS/HTTP2 because proxy_http_version gets set to 1.1 ?

Example :

upstream https_backend {
server 127.0.0.1:443;

keepalive 16;
}

server {
listen 443 ssl http2;

location /https/ {
proxy_pass https://https_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}

http://www.networkflare.com/
Subject Author Posted

Nginx proxy_pass HTTPS/SSL/HTTP2 keepalive

c0nw0nk February 24, 2017 05:07AM

Re: Nginx proxy_pass HTTPS/SSL/HTTP2 keepalive

c0nw0nk February 24, 2017 05:50AM

Re: Nginx proxy_pass HTTPS/SSL/HTTP2 keepalive

Maxim Dounin February 25, 2017 06:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready