Skip to content

Instantly share code, notes, and snippets.

@auggod
Created July 29, 2016 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auggod/6af694c9e7790cbadf904b682ff7099a to your computer and use it in GitHub Desktop.
Save auggod/6af694c9e7790cbadf904b682ff7099a to your computer and use it in GitHub Desktop.
server {
listen 443 ssl;
ssl on;
ssl_certificate /etc/ssl/certs/key.crt;
ssl_certificate_key /etc/ssl/private/key.key;
server_name hostname.tld;
location / {
allow 127.0.0.1;
#allow all;
deny all;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Url-Scheme $scheme;
proxy_max_temp_file_size 0;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment