Created
May 5, 2017 19:06
-
-
Save tkshnwesper/0841e9a285faac7f3ba17fee0821d73d 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
http { | |
include mime.types; | |
default_type application/octet-stream; | |
keepalive_timeout 180; | |
client_max_body_size 0; | |
sendfile on; | |
tcp_nodelay on; | |
gzip off; | |
upstream droppy { | |
server 127.0.0.1:8989; | |
keepalive 32; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name droppy.example.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name droppy.example.com; | |
access_log /var/log/nginx/droppy.example.com.log; | |
ssl_certificate /etc/letsencrypt/live/droppy.example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/droppy.example.com/privkey.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/droppy.example.com/fullchain.pem; | |
location / { | |
proxy_pass http://droppy/; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Real-Port $remote_port; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass_header Date; | |
proxy_http_version 1.1; | |
proxy_cache off; | |
proxy_buffering off; | |
proxy_redirect off; | |
proxy_request_buffering off; | |
proxy_ignore_client_abort on; | |
proxy_connect_timeout 7200; | |
proxy_read_timeout 7200; | |
proxy_send_timeout 7200; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment