diff --git a/common/destructables.conf b/common/destructables.conf new file mode 100644 index 0000000..8b14ee5 --- /dev/null +++ b/common/destructables.conf @@ -0,0 +1,28 @@ +add_header Onion-Location http://ds.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; +add_header X-I2P-Location http://vern543vpdnea54gxj4ra66ijciu4fff26emabkdz4w4rgnyx2eq.b32.i2p.b32.i2p$request_uri; + +location / { + proxy_pass http://10.0.3.57:2946; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; +} + +location /proxy/ { + proxy_pass http://10.0.3.57:2946; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_cache ds-img; +} + +location /contest/archive/ { + proxy_pass http://10.0.3.57:2946; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_cache ds-archive; +} diff --git a/common/lab.conf b/common/lab.conf new file mode 100644 index 0000000..4231835 --- /dev/null +++ b/common/lab.conf @@ -0,0 +1,10 @@ +add_header Onion-Location http://lab.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; +add_header X-I2P-Location http://vernfhoyrbg5khg5ub6macvqy3hqlumusjyk3zjmahnupz3s3ola.b32.i2p.b32.i2p$request_uri; + +location / { + proxy_pass http://10.0.3.57:2947; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; +} diff --git a/conf.d/destructables.conf b/conf.d/destructables.conf new file mode 100644 index 0000000..bad91aa --- /dev/null +++ b/conf.d/destructables.conf @@ -0,0 +1,35 @@ +proxy_cache_path /tmp/destructables-img-cache keys_zone=ds-img:60m inactive=60m; +proxy_cache_path /tmp/destructables-archive-cache keys_zone=ds-archive:2880m inactive=30d; + +server { + listen 80; + listen [::]:80; + + server_name ds.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion destructables.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion instructables.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + + include common/destructables.conf; +} + +server { + listen 11101; + listen [::]:11101; + + server_name vern543vpdnea54gxj4ra66ijciu4fff26emabkdz4w4rgnyx2eq.b32.i2p; + + include common/destructables.conf; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + include snippets/lets-encrypt.conf; + server_name ds.vern.cc destructables.vern.cc instructables.vern.cc; + include common/destructables.conf; +} + +server { + listen 80; + listen [::]:80; + return 301 https://$host$request_uri; + server_name ds.vern.cc destructables.vern.cc instructables.vern.cc; +} diff --git a/conf.d/lab.conf b/conf.d/lab.conf new file mode 100644 index 0000000..ffc5aff --- /dev/null +++ b/conf.d/lab.conf @@ -0,0 +1,32 @@ +server { + listen 80; + listen [::]:80; + + server_name lab.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion laboratory.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion gitlab.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + + include common/lab.conf; +} + +server { + listen 11102; + listen [::]:11102; + + server_name vernfhoyrbg5khg5ub6macvqy3hqlumusjyk3zjmahnupz3s3ola.b32.i2p; + + include common/lab.conf; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + include snippets/lets-encrypt.conf; + server_name lab.vern.cc laboratory.vern.cc gitlab.vern.cc; + include common/lab.conf; +} + +server { + listen 80; + listen [::]:80; + return 301 https://$host$request_uri; + server_name lab.vern.cc laboratory.vern.cc gitlab.vern.cc; +} diff --git a/conf.d/minetest.conf b/conf.d/minetest.conf index b941075..07734c3 100644 --- a/conf.d/minetest.conf +++ b/conf.d/minetest.conf @@ -1,22 +1,22 @@ server { listen 443 ssl http2; listen [::]:443 ssl http2; -server_name minetest.vern.cc; + server_name minetest.vern.cc; include snippets/lets-encrypt.conf; -location / { - proxy_pass http://127.0.0.1:5008/; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $host; # so Invidious knows domain - proxy_http_version 1.1; # to keep alive - proxy_set_header Connection ""; # to keep alive -} + location / { + proxy_pass http://127.0.0.1:5008/; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; # so Invidious knows domain + proxy_http_version 1.1; # to keep alive + proxy_set_header Connection ""; # to keep alive + } } server { listen 80; listen [::]:80; return 301 https://$host$request_uri; -server_name minetest.vern.cc; + server_name minetest.vern.cc; }