SHARE
TWEET

NGINX Proxy config for Discouse with SSL

Grex Jun 3rd, 2016 535 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 forums.grimreapergamers.com;
  5.         return 301 https://$server_name$request_uri;
  6. }
  7. server {
  8.         listen 443 ssl http2 default_server;
  9.         listen [::]:443 ssl http2 default_server;
  10.        
  11.         server_name forums.grimreapergamers.com;
  12.        
  13.         ssl_certificate /etc/letsencrypt/live/grimreapergamers.com/fullchain.pem;
  14.         ssl_certificate_key /etc/letsencrypt/live/grimreapergamers.com/privkey.pem;
  15.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  16.         ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
  17.         ssl_prefer_server_ciphers on;
  18.        
  19.         location / {
  20.             proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
  21.             proxy_set_header Host $http_host;
  22.             proxy_http_version 1.1;
  23.             proxy_set_header X-Real-IP $remote_addr;
  24.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25.         }
  26. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top