anapirata.conf 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ## Configuração para anapirata.partidopirata.org
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name anapirata.partidopirata.org;
  6. root /var/www/www/default/;
  7. index index.php index.html index.htm;
  8. location / {
  9. proxy_pass http://docker1;
  10. proxy_set_header Host $host;
  11. proxy_set_header X-Forwarded-For $remote_addr;
  12. proxy_set_header X-Forwarded-Proto $scheme;
  13. }
  14. location ~ /\.ht {
  15. deny all;
  16. }
  17. }
  18. server {
  19. listen 80;
  20. listen [::]:80;
  21. server_name *.anapirata.partidopirata.org;
  22. return 301 http://anapirata.partidopirata.org$request_uri;
  23. }
  24. ## SSL
  25. server {
  26. listen 443 ssl;
  27. listen [::]:443 ssl;
  28. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  29. ssl_prefer_server_ciphers on;
  30. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  31. ssl_ecdh_curve secp384r1;
  32. ssl_session_cache shared:SSL:10m;
  33. ssl_session_tickets off;
  34. ssl_stapling on;
  35. ssl_stapling_verify on;
  36. resolver 208.67.220.220 208.67.222.222 valid=300s;
  37. resolver_timeout 5s;
  38. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  39. add_header X-Frame-Options SAMEORIGIN;
  40. add_header X-Content-Type-Options nosniff;
  41. ssl_certificate /etc/letsencrypt/live/partidopirata.org-0001/fullchain.pem;
  42. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org-0001/privkey.pem;
  43. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org-0001/chain.pem;
  44. server_name anapirata.partidopirata.org;
  45. root /var/www/www/default/;
  46. index index.php index.html index.htm;
  47. location / {
  48. ## TODO: Configurar SSL nos upstreams
  49. proxy_pass http://docker1;
  50. proxy_set_header Host $host;
  51. proxy_set_header X-Forwarded-For $remote_addr;
  52. proxy_set_header X-Forwarded-Proto $scheme;
  53. }
  54. location ~ /\.ht {
  55. deny all;
  56. }
  57. }
  58. ## Tor
  59. server {
  60. listen 127.0.0.1:42981;
  61. allow 127.0.0.1;
  62. deny all;
  63. add_header X-Frame-Options SAMEORIGIN;
  64. add_header X-Content-Type-Options nosniff;
  65. server_name ana5s26zq5enf6ov.onion;
  66. root /var/www/www/default/;
  67. index index.php index.html index.htm;
  68. location / {
  69. ## TODO: Configurar SSL nos upstreams
  70. proxy_pass http://docker1;
  71. proxy_set_header Host $host;
  72. proxy_set_header X-Forwarded-For $remote_addr;
  73. proxy_set_header X-Forwarded-Proto $scheme;
  74. }
  75. location ~ /\.ht {
  76. deny all;
  77. }
  78. }