Guest User

discourse.conf

a guest
Nov 17th, 2019
232
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. if ($host = discourse.domainname.com) {
  3. return 301 https://$host$request_uri;
  4. } # managed by Certbot
  5.  
  6. listen 192.168.0.101:80; listen [::]:80;
  7. server_name discourse.domainname.com;
  8. return 301 https://discourse.domainname.com$request_uri;
  9. }
  10.  
  11. server {
  12. # The IP that you forwarded in your router (nginx proxy)
  13. listen 192.168.0.101:443 ssl http2; #listen [::]:443 ssl;
  14.  
  15. # SSL config
  16. ssl on;
  17. ssl_certificate /etc/letsencrypt/live/discourse.domainname.com-0001/fullchain.pem; # managed by Certbot
  18. ssl_certificate_key /etc/letsencrypt/live/discourse.domainname.com-0001/privkey.pem; # managed by Certbot
  19. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  20. 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';
  21. ssl_prefer_server_ciphers on;
  22.  
  23. # Make site accessible from http://localhost/
  24. server_name discourse.domainname.com;
  25.  
  26. # The internal IP of the VM that hosts your Apache config
  27. set $upstream 192.168.0.104;
  28.  
  29. location / {
  30. proxy_pass http://discourse.domainname.com:8080/;
  31. proxy_set_header Host $host;
  32. proxy_set_header X-Real-IP $remote_addr;
  33. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  34. proxy_http_version 1.1;
  35. proxy_set_header X-Forwarded-Proto $scheme;
  36. proxy_set_header Connection "";
  37. proxy_buffering off;
  38. client_max_body_size 0;
  39. proxy_read_timeout 36000s;
  40. proxy_redirect http://discourse.domainname.com:8080/ https://discourse.domainname.com;
  41. }
  42. }
RAW Paste Data