diff --git a/common/bloat.conf b/common/bloat.conf new file mode 100644 index 0000000..d8d6ad8 --- /dev/null +++ b/common/bloat.conf @@ -0,0 +1,11 @@ +add_header Onion-Location http://bloat.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; + +location / { + client_max_body_size 100m; + proxy_pass http://localhost:5041/; # The / is important! + proxy_redirect off; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_cookie_path / "/; Secure; HttpOnly; SameSite=lax"; +} diff --git a/common/mirror.conf b/common/mirror.conf index beb7d42..9d647ff 100644 --- a/common/mirror.conf +++ b/common/mirror.conf @@ -4,6 +4,13 @@ ssi on; location / { add_before_body /nav.html; - autoindex on; - autoindex_exact_size off; + fancyindex on; + fancyindex_exact_size off; + fancyindex_default_sort date; +} +location /gnu { + add_before_body /gnu.html; + fancyindex on; + fancyindex_exact_size off; + fancyindex_default_sort date; } diff --git a/modules-enabled/50-mod-http-fancyindex.conf b/modules-enabled/50-mod-http-fancyindex.conf new file mode 120000 index 0000000..126d476 --- /dev/null +++ b/modules-enabled/50-mod-http-fancyindex.conf @@ -0,0 +1 @@ +/usr/share/nginx/modules-available/mod-http-fancyindex.conf \ No newline at end of file diff --git a/sites-available/cryptpad.conf b/sites-available/cryptpad.conf index fdec82a..d6a0187 100644 --- a/sites-available/cryptpad.conf +++ b/sites-available/cryptpad.conf @@ -1,12 +1,28 @@ -# This file is included strictly as an example of how Nginx can be configured -# to work with CryptPad. This example WILL NOT WORK AS IS. For best results, -# compare the sections of this configuration file against a working CryptPad -# installation (http server by the Nodejs process). If you are using CryptPad -# in production and require professional support please contact sales@cryptpad.fr +server { + listen 80; + listen [::]:80; + + listen 11021; + listen [::]:11021; + + server_name pad.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + server_name vernccl7gknhlgousdumou4dryxkm25dzx54yitr6k7kqxzfulwa.b32.i2p; + + location / { +# proxy_pass https://pad.vern.cc/; + proxy_redirect https://pad.vern.cc/ http://$host/; + proxy_set_header Host pad.vern.cc; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + +} server { listen 443 ssl http2; + add_header Onion-Location http://pad.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; + # CryptPad serves static assets over these two domains. # `main_domain` is what users will enter in their address bar. # Privileged computation such as key management is handled in this scope diff --git a/sites-available/mastodon.conf b/sites-available/mastodon.conf index 11d9902..8da7137 100644 --- a/sites-available/mastodon.conf +++ b/sites-available/mastodon.conf @@ -37,19 +37,25 @@ server { include common/mastodon.conf; } + +server { + listen 80; + listen [::]:80; + + listen 11020; + listen [::]:11020; + + server_name bloat.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + server_name vernccqhizmt3bu7jkfc7hmp2vor6kyy35rxghdedk245dfgtwsq.b32.i2p; + + include common/bloat.conf; +} + server { listen 443 ssl http2; server_name bloat.vern.cc; if ($https = '') { return 301 https://$host$request_uri; } # if not connected to HTTPS, perma-redirect to HTTPS include snippets/lets-encrypt.conf; -location / { - client_max_body_size 100m; - proxy_pass http://localhost:5041/; # The / is important! - 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_cookie_path / "/; Secure; HttpOnly; SameSite=lax"; -} + include common/bloat.conf; }