Last active
December 20, 2015 01:28
-
-
Save manutter51/6048766 to your computer and use it in GitHub Desktop.
Local nginx config for using http-kit with and without SSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream http_backend { | |
server localhost:33333; | |
keepalive 32; | |
} | |
server { | |
listen 3333 default_server; | |
server_name localhost; | |
location / { | |
proxy_pass http://http_backend; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
} | |
} | |
server { | |
listen 3334 default_server; | |
server_name localhost; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; | |
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; | |
ssl_session_cache shared:SSL:10m; | |
location / { | |
proxy_pass http://http_backend; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto https; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment