docker.conf 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. # jibby.org
  2. server {
  3. server_name jibby.org;
  4. location / {
  5. set $temp $request;
  6. if ($temp ~ (.*)password=[^&]*(.*)) {
  7. set $temp $1password=****$2;
  8. }
  9. access_log /var/log/nginx/access.log filter;
  10. proxy_set_header Host jibby.org;
  11. proxy_set_header X-Real-IP $remote_addr;
  12. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13. proxy_set_header X-Scheme $scheme;
  14. proxy_set_header X-Forwarded-Proto $scheme;
  15. proxy_set_header X-Nginx-Scheme $scheme;
  16. proxy_set_header X-Forwarded-Port $server_port;
  17. proxy_redirect off;
  18. proxy_pass http://localhost:8080;
  19. }
  20. # Used to try and trick matrix into routing jibby.org traffic to matrix
  21. # location /_matrix {
  22. # proxy_pass http://localhost:8008;
  23. # proxy_set_header X-Forwarded-For $remote_addr;
  24. # }
  25. #
  26. location /.well-known/matrix/ {
  27. root /var/www/;
  28. default_type application/json;
  29. add_header Access-Control-Allow-Origin *;
  30. }
  31. listen 443 ssl; # managed by Certbot
  32. ssl_certificate /etc/letsencrypt/live/jibby.org/fullchain.pem; # managed by Certbot
  33. ssl_certificate_key /etc/letsencrypt/live/jibby.org/privkey.pem; # managed by Certbot
  34. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  35. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  36. }
  37. server {
  38. if ($host = jibby.org) {
  39. return 302 https://$host$request_uri;
  40. } # managed by Certbot
  41. server_name jibby.org;
  42. listen 80;
  43. return 404; # managed by Certbot
  44. }
  45. # *.jibby.org
  46. server {
  47. server_name ~^(?<subdomain>.+)\.jibby\.org$;
  48. location / {
  49. set $temp $request;
  50. if ($temp ~ (.*)password=[^&]*(.*)) {
  51. set $temp $1password=****$2;
  52. }
  53. access_log /var/log/nginx/access.log filter;
  54. proxy_set_header Host $subdomain.jibby.org;
  55. proxy_set_header X-Real-IP $remote_addr;
  56. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  57. proxy_set_header X-Scheme $scheme;
  58. proxy_set_header X-Forwarded-Proto $scheme;
  59. proxy_set_header X-Nginx-Scheme $scheme;
  60. proxy_set_header X-Forwarded-Port $server_port;
  61. proxy_redirect off;
  62. proxy_pass http://localhost:8080;
  63. }
  64. listen 443 ssl; # managed by Certbot
  65. ssl_certificate /etc/letsencrypt/live/jibby.org-0001/fullchain.pem; # managed by Certbot
  66. ssl_certificate_key /etc/letsencrypt/live/jibby.org-0001/privkey.pem; # managed by Certbot
  67. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  68. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  69. }
  70. server {
  71. if ($host ~* (?<subdomain>.+)\.jibby\.org) {
  72. return 302 https://$host$request_uri;
  73. } # managed by Certbot
  74. server_name ~^(?<subdomain>.+)\.jibby\.org$;
  75. listen 80;
  76. return 404; # managed by Certbot
  77. }
  78. # jossh.us
  79. # server {
  80. # server_name jossh.us;
  81. #
  82. # location / {
  83. # set $temp $request;
  84. # if ($temp ~ (.*)password=[^&]*(.*)) {
  85. # set $temp $1password=****$2;
  86. # }
  87. # access_log /var/log/nginx/access.log filter;
  88. #
  89. # proxy_set_header Host jossh.us;
  90. # proxy_set_header X-Real-IP $remote_addr;
  91. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  92. # proxy_set_header X-Scheme $scheme;
  93. # proxy_set_header X-Forwarded-Proto $scheme;
  94. # proxy_set_header X-Nginx-Scheme $scheme;
  95. # proxy_set_header X-Forwarded-Port $server_port;
  96. # proxy_redirect off;
  97. # proxy_pass http://localhost:8080;
  98. # }
  99. #
  100. #
  101. # listen 443 ssl; # managed by Certbot
  102. # ssl_certificate /etc/letsencrypt/live/jossh.us/fullchain.pem; # managed by Certbot
  103. # ssl_certificate_key /etc/letsencrypt/live/jossh.us/privkey.pem; # managed by Certbot
  104. # include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  105. # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  106. #
  107. #
  108. # }
  109. #
  110. # server {
  111. # if ($host = jossh.us) {
  112. # return 302 https://$host$request_uri;
  113. # } # managed by Certbot
  114. #
  115. #
  116. # server_name jossh.us;
  117. # listen 80;
  118. # return 404; # managed by Certbot
  119. #
  120. #
  121. # }
  122. #
  123. #
  124. # # *.jossh.us
  125. # server {
  126. # server_name ~^(?<subdomain>.+)\.jossh\.us$;
  127. #
  128. # location / {
  129. #
  130. # set $temp $request;
  131. # if ($temp ~ (.*)password=[^&]*(.*)) {
  132. # set $temp $1password=****$2;
  133. # }
  134. # access_log /var/log/nginx/access.log filter;
  135. #
  136. # proxy_set_header Host $subdomain.jossh.us;
  137. # proxy_set_header X-Real-IP $remote_addr;
  138. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  139. # proxy_set_header X-Scheme $scheme;
  140. # proxy_set_header X-Forwarded-Proto $scheme;
  141. # proxy_set_header X-Nginx-Scheme $scheme;
  142. # proxy_set_header X-Forwarded-Port $server_port;
  143. # proxy_redirect off;
  144. # proxy_pass http://localhost:8080;
  145. # }
  146. #
  147. # listen 443 ssl; # managed by Certbot
  148. # ssl_certificate /etc/letsencrypt/live/jossh.us-0001/fullchain.pem; # managed by Certbot
  149. # ssl_certificate_key /etc/letsencrypt/live/jossh.us-0001/privkey.pem; # managed by Certbot
  150. # include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  151. # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  152. #
  153. # }
  154. #
  155. # server {
  156. #
  157. # if ($host ~* (?<subdomain>.+)\.jossh\.us) {
  158. # return 302 https://$host$request_uri;
  159. # } # managed by Certbot
  160. #
  161. #
  162. # server_name ~^(?<subdomain>.+)\.jibby\.org$;
  163. # listen 80;
  164. # return 404; # managed by Certbot
  165. #
  166. #
  167. # }