midia.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ## Configuração para midia.partidopirata.org
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name midia.partidopirata.org;
  6. return 301 https://midia.partidopirata.org$request_uri;
  7. }
  8. server {
  9. listen 80;
  10. listen [::]:80;
  11. server_name *.midia.partidopirata.org;
  12. return 301 http://midia.partidopirata.org$request_uri;
  13. }
  14. ## SSL
  15. server {
  16. listen 443 ssl;
  17. listen [::]:443 ssl;
  18. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  19. ssl_prefer_server_ciphers on;
  20. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  21. ssl_ecdh_curve secp384r1;
  22. ssl_session_cache shared:SSL:10m;
  23. ssl_session_tickets off;
  24. ssl_stapling on;
  25. ssl_stapling_verify on;
  26. resolver 208.67.220.220 208.67.222.222 valid=300s;
  27. resolver_timeout 5s;
  28. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  29. add_header X-Frame-Options SAMEORIGIN;
  30. add_header X-Content-Type-Options nosniff;
  31. ssl_certificate /etc/letsencrypt/live/partidopirata.org/fullchain.pem;
  32. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org/privkey.pem;
  33. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org/chain.pem;
  34. server_name midia.partidopirata.org;
  35. root /var/www/youtube-dl/;
  36. location / {
  37. proxy_pass http://entwickler;
  38. proxy_set_header Host $host;
  39. proxy_set_header X-Forwarded-For $remote_addr;
  40. proxy_set_header X-Forwarded-Proto $scheme;
  41. }
  42. }
  43. ## Tor
  44. #server {
  45. # listen 127.0.0.1:42900;
  46. # allow 127.0.0.1;
  47. # deny all;
  48. #
  49. # add_header X-Frame-Options SAMEORIGIN;
  50. # add_header X-Content-Type-Options nosniff;
  51. #
  52. # server_name midia.onion;
  53. # root /var/www/youtube-dl/;
  54. #}