Skip to content

Instantly share code, notes, and snippets.

@tkshnwesper tkshnwesper/droppy
Created May 5, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.