www.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ## Configuração para partidopirata.org
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name partidopirata.org;
  6. root /var/www/www/default/;
  7. index index.php index.html index.htm;
  8. location / {
  9. proxy_pass http://docker0;
  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 www.partidopirata.org;
  22. return 301 http://partidopirata.org$request_uri;
  23. }
  24. server {
  25. listen 80;
  26. listen [::]:80;
  27. server_name *.www.partidopirata.org;
  28. return 301 http://partidopirata.org$request_uri;
  29. }
  30. ## SSL
  31. server {
  32. listen 443 ssl;
  33. listen [::]:443 ssl;
  34. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  35. ssl_prefer_server_ciphers on;
  36. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  37. ssl_ecdh_curve secp384r1;
  38. ssl_session_cache shared:SSL:10m;
  39. ssl_session_tickets off;
  40. ssl_stapling on;
  41. ssl_stapling_verify on;
  42. resolver 208.67.220.220 208.67.222.222 valid=300s;
  43. resolver_timeout 5s;
  44. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  45. add_header X-Frame-Options SAMEORIGIN;
  46. add_header X-Content-Type-Options nosniff;
  47. ssl_certificate /etc/letsencrypt/live/partidopirata.org-0001/fullchain.pem;
  48. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org-0001/privkey.pem;
  49. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org-0001/chain.pem;
  50. server_name partidopirata.org;
  51. root /var/www/www/default/;
  52. index index.php index.html index.htm;
  53. location / {
  54. proxy_pass http://docker0;
  55. proxy_set_header Host $host;
  56. proxy_set_header X-Forwarded-For $remote_addr;
  57. proxy_set_header X-Forwarded-Proto $scheme;
  58. }
  59. location ~ /\.ht {
  60. deny all;
  61. }
  62. }
  63. server {
  64. listen 443 ssl;
  65. listen [::]:443 ssl;
  66. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  67. ssl_prefer_server_ciphers on;
  68. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  69. ssl_ecdh_curve secp384r1;
  70. ssl_session_cache shared:SSL:10m;
  71. ssl_session_tickets off;
  72. ssl_stapling on;
  73. ssl_stapling_verify on;
  74. resolver 208.67.220.220 208.67.222.222 valid=300s;
  75. resolver_timeout 5s;
  76. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  77. add_header X-Frame-Options SAMEORIGIN;
  78. add_header X-Content-Type-Options nosniff;
  79. ssl_certificate /etc/letsencrypt/live/partidopirata.org-0001/fullchain.pem;
  80. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org-0001/privkey.pem;
  81. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org-0001/chain.pem;
  82. server_name www.partidopirata.org;
  83. return 301 https://partidopirata.org$request_uri;
  84. }
  85. ## Tor
  86. server {
  87. listen 127.0.0.1:42980;
  88. allow 127.0.0.1;
  89. deny all;
  90. add_header X-Frame-Options SAMEORIGIN;
  91. add_header X-Content-Type-Options nosniff;
  92. server_name piratasxmu4ven46.onion;
  93. root /var/www/www/default/;
  94. index index.php index.html index.htm;
  95. location / {
  96. proxy_pass http://docker0;
  97. proxy_set_header Host $host;
  98. proxy_set_header X-Forwarded-For $remote_addr;
  99. proxy_set_header X-Forwarded-Proto $scheme;
  100. }
  101. location ~ /\.ht {
  102. deny all;
  103. }
  104. }