SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.     server_name scottdiemer.com www.scottdiemer.com;
  5.     return 301 https://www.scottdiemer.com$request_uri;
  6. }
  7.  
  8. # HTTPS — proxy all requests to the Node app
  9. server {
  10.     # Enable HTTP/2
  11.     listen 443 ssl http2;
  12.     listen [::]:443 ssl http2;
  13.     server_name scottdiemer.com www.scottdiemer.com;
  14.  
  15.     # Use the Let’s Encrypt certificates
  16.     ssl_certificate /etc/letsencrypt/live/www.scottdiemer.com/fullchain.pem;
  17.     ssl_certificate_key /etc/letsencrypt/live/www.scottdiemer.com/privkey.pem;
  18.  
  19.     # Include the SSL configuration from cipherli.st
  20.     include /etc/nginx/snippets/ssl-params.conf;
  21.  
  22.     location / {
  23.         proxy_set_header X-Real-IP $remote_addr;
  24.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25.         proxy_set_header X-NginX-Proxy true;
  26.         proxy_pass http://localhost:3000/;
  27.         proxy_ssl_session_reuse off;
  28.         proxy_set_header Host $http_host;
  29.         proxy_cache_bypass $http_upgrade;
  30.         proxy_redirect off;
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top