gti.conf 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ## Configuração para gti.partidopirata.org
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name gti.partidopirata.org;
  6. return 301 https://gti.partidopirata.org$request_uri;
  7. }
  8. server {
  9. listen 80;
  10. listen [::]:80;
  11. server_name *.gti.partidopirata.org;
  12. return 301 http://gti.partidopirata.org$request_uri;
  13. }
  14. server {
  15. listen 80;
  16. listen [::]:80;
  17. server_name github.partidopirata.org;
  18. return 301 https://github.partidopirata.org$request_uri;
  19. }
  20. server {
  21. listen 80;
  22. listen [::]:80;
  23. server_name *.github.partidopirata.org;
  24. return 301 http://github.partidopirata.org$request_uri;
  25. }
  26. ## SSL
  27. server {
  28. listen 443 ssl;
  29. listen [::]:443 ssl;
  30. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  31. ssl_prefer_server_ciphers on;
  32. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  33. ssl_ecdh_curve secp384r1;
  34. ssl_session_cache shared:SSL:10m;
  35. ssl_session_tickets off;
  36. ssl_stapling on;
  37. ssl_stapling_verify on;
  38. resolver 208.67.220.220 208.67.222.222 valid=300s;
  39. resolver_timeout 5s;
  40. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  41. add_header X-Frame-Options SAMEORIGIN;
  42. add_header X-Content-Type-Options nosniff;
  43. ssl_certificate /etc/letsencrypt/live/partidopirata.org-0001/fullchain.pem;
  44. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org-0001/privkey.pem;
  45. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org-0001/chain.pem;
  46. server_name gti.partidopirata.org;
  47. root /var/www/git/gti-site;
  48. location / {
  49. proxy_pass https://piratas.github.io/;
  50. }
  51. location /entre-no-gti {
  52. return 307 /;
  53. }
  54. location /formulario {
  55. return 307 /;
  56. }
  57. location /github {
  58. return 307 https://github.com/piratas/gti/issues;
  59. }
  60. location /loomio {
  61. return 307 https://www.loomio.org/g/JDmI4ZKv/;
  62. }
  63. location /notabug {
  64. return 307 https://notabug.org/piratas/organizacao/issues;
  65. }
  66. location /taiga {
  67. return 307 https://tree.taiga.io/project/tipirata;
  68. }
  69. location /wiki {
  70. return 307 https://wiki.partidopirata.org/wiki/gti;
  71. }
  72. }
  73. server {
  74. listen 443 ssl;
  75. listen [::]:443 ssl;
  76. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  77. ssl_prefer_server_ciphers on;
  78. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  79. ssl_ecdh_curve secp384r1;
  80. ssl_session_cache shared:SSL:10m;
  81. ssl_session_tickets off;
  82. ssl_stapling on;
  83. ssl_stapling_verify on;
  84. resolver 208.67.220.220 208.67.222.222 valid=300s;
  85. resolver_timeout 5s;
  86. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  87. add_header X-Frame-Options SAMEORIGIN;
  88. add_header X-Content-Type-Options nosniff;
  89. ssl_certificate /etc/letsencrypt/live/partidopirata.org-0001/fullchain.pem;
  90. ssl_certificate_key /etc/letsencrypt/live/partidopirata.org-0001/privkey.pem;
  91. ssl_trusted_certificate /etc/letsencrypt/live/partidopirata.org-0001/chain.pem;
  92. server_name github.partidopirata.org;
  93. root /var/www/git/gti-site;
  94. location / {
  95. proxy_pass https://piratas.github.io/;
  96. }
  97. location /entre-no-gti {
  98. return 307 /;
  99. }
  100. location /formulario {
  101. return 307 /;
  102. }
  103. location /github {
  104. return 307 https://github.com/piratas/gti/issues;
  105. }
  106. location /loomio {
  107. return 307 https://www.loomio.org/g/JDmI4ZKv/;
  108. }
  109. location /notabug {
  110. return 307 https://notabug.org/piratas/organizacao/issues;
  111. }
  112. location /taiga {
  113. return 307 https://tree.taiga.io/project/tipirata;
  114. }
  115. location /wiki {
  116. return 307 https://wiki.partidopirata.org/wiki/gti;
  117. }
  118. }
  119. ## Tor
  120. server {
  121. listen 127.0.0.1:42915;
  122. allow 127.0.0.1;
  123. deny all;
  124. add_header X-Frame-Options SAMEORIGIN;
  125. add_header X-Content-Type-Options nosniff;
  126. server_name gticmrgitxepelle.onion;
  127. root /var/www/git/gti-site;
  128. location / {
  129. proxy_pass https://piratas.github.io/;
  130. }
  131. location /entre-no-gti {
  132. return 307 /;
  133. }
  134. location /formulario {
  135. return 307 /;
  136. }
  137. location /github {
  138. return 307 https://github.com/piratas/gti/issues;
  139. }
  140. location /loomio {
  141. return 307 https://www.loomio.org/g/JDmI4ZKv/;
  142. }
  143. location /notabug {
  144. return 307 https://notabug.org/piratas/organizacao/issues;
  145. }
  146. location /taiga {
  147. return 307 https://tree.taiga.io/project/tipirata;
  148. }
  149. location /wiki {
  150. return 307 https://wiki.partidopirata.org/wiki/gti;
  151. }
  152. }
  153. server {
  154. listen 127.0.0.1:42903;
  155. allow 127.0.0.1;
  156. deny all;
  157. add_header X-Frame-Options SAMEORIGIN;
  158. add_header X-Content-Type-Options nosniff;
  159. server_name joxeelupougy3vqq.onion;
  160. return 301 http://gticmrgitxepelle.onion$request_uri;
  161. }