goworking.conf 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. upstream gunicorn-goworking {
  2. server 127.0.0.1:8000;
  3. }
  4. server {
  5. listen 80;
  6. listen [::]:80;
  7. server_name goworking.fabricadofuturo.com.br;
  8. return 301 http://goworking.fabricadofuturo.com.br$request_uri;
  9. }
  10. server {
  11. listen 80;
  12. listen [::]:80;
  13. server_name goworking.fabricadofuturo.com;
  14. # root /var/www/git/fabricadofuturo/goworking-mesas/;
  15. # index index.html;
  16. # charset utf-8;
  17. location /static {
  18. alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/web/static;
  19. }
  20. location /goworking/static {
  21. alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/goworking/static;
  22. }
  23. location / {
  24. proxy_pass http://gunicorn-goworking;
  25. proxy_set_header Host $host;
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. proxy_set_header X-Forwarded-Proto $scheme;
  29. client_max_body_size 5M;
  30. }
  31. }
  32. server {
  33. listen 443 ssl;
  34. listen [::]:443 ssl;
  35. #ssl_protocols TLSv1.2; # nginx v1.10.3
  36. #ssl_prefer_server_ciphers on;
  37. #ssl_dhparam /etc/nginx/dhparam.pem;
  38. #ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
  39. #ssl_ecdh_curve secp384r1;
  40. #ssl_session_timeout 10m;
  41. #ssl_session_cache shared:SSL:10m;
  42. #ssl_session_tickets off;
  43. #ssl_stapling on;
  44. #ssl_stapling_verify on;
  45. #resolver 208.67.220.220 208.67.222.222 valid=300s;
  46. #resolver_timeout 5s;
  47. #add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  48. #add_header X-Frame-Options SAMEORIGIN;
  49. #add_header X-Content-Type-Options nosniff;
  50. #add_header X-XSS-Protection "1; mode=block";
  51. ssl_certificate /etc/letsencrypt/live/goworking.fabricadofuturo.com/fullchain.pem;
  52. ssl_certificate_key /etc/letsencrypt/live/goworking.fabricadofuturo.com/privkey.pem;
  53. #ssl_trusted_certificate /etc/letsencrypt/live/goworking.fabricadofuturo.com/chain.pem;
  54. server_name goworking.fabricadofuturo.com;
  55. # root /var/www/git/fabricadofuturo/goworking-mesas/;
  56. # index index.html;
  57. # charset utf-8;
  58. location /static {
  59. alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/web/static;
  60. }
  61. location /goworking/static {
  62. alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/goworking/static;
  63. }
  64. location / {
  65. proxy_pass http://gunicorn-goworking;
  66. proxy_set_header Host $host;
  67. proxy_set_header X-Real-IP $remote_addr;
  68. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  69. proxy_set_header X-Forwarded-Proto $scheme;
  70. client_max_body_size 5M;
  71. }
  72. }