Created
March 13, 2017 21:38
-
-
Save mangadul/94b89ed428a1852d8d165ebdfb011665 to your computer and use it in GitHub Desktop.
This file contains 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 80; | |
server_name tatapmuka.id www.tatapmuka.id; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
# host name to respond to | |
server_name tatapmuka.id; | |
# your SSL configuration | |
ssl on; | |
ssl_certificate /etc/ssl/tatapmuka/comodo-ssl-bundle.crt; | |
ssl_certificate_key /etc/ssl/tatapmuka/comodo-tatapmuka-id.key; | |
access_log /var/log/nginx/tatapmuka_access.log; | |
error_log /var/log/nginx/tatapmuka_error.log; | |
location / { | |
# switch off logging | |
access_log off; | |
# redirect all HTTP traffic to localhost:8080 | |
proxy_pass https://127.0.0.1:8443; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
# WebSocket support (nginx 1.4) | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_read_timeout 600s; | |
proxy_send_timeout 600s; | |
proxy_connect_timeout 20s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment