etherpad.conf 3.1 KB

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