Skip to content

Instantly share code, notes, and snippets.

@urakozz
Last active August 29, 2015 14:23
Show Gist options
  • Save urakozz/ef60615944d1da919bc6 to your computer and use it in GitHub Desktop.
Save urakozz/ef60615944d1da919bc6 to your computer and use it in GitHub Desktop.
Nginx proxy with keepalive connection
upstream service-keepalive {
server loadbalancer.aws.com:443 max_fails=0 fail_timeout=30s;
keepalive 1024;
}
server {
listen 8443;
server_name service.proxy.example.net;
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host "service.myapp.com";
proxy_pass https://service-keepalive;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment