Created
April 17, 2014 05:21
-
-
Save DamonOehlman/10954773 to your computer and use it in GitHub Desktop.
Simple nginx configuration for proxying HTTPS traffic to a local port
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
server { | |
listen 443; | |
server_name localhost; | |
root html; | |
index index.html index.htm; | |
ssl on; | |
ssl_certificate server.crt; | |
ssl_certificate_key server.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; | |
ssl_prefer_server_ciphers on; | |
location ~ ^/(?<fwdport>\d+)/(?<fwdpath>.*)$ { | |
proxy_pass http://127.0.0.1:$fwdport/$fwdpath; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
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
# the following request would be directed to http://localhost:8000/index.html | |
curl https://localhost/8000/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment