nginx-configs/sites-available/mastodon.conf

62 lines
1.4 KiB
Plaintext

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream backend {
server 127.0.0.1:3999 fail_timeout=0;
}
upstream streaming {
server 127.0.0.1:4000 fail_timeout=0;
}
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g;
server {
listen 80;
listen [::]:80;
listen 11007;
listen [::]:11007;
server_name fedi.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion mastodon.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
server_name vernccxro6qjs2fmwp2as5eavlnz6uzsxqqnhk3skkhpszp73ubq.b32.i2p;
include common/mastodon.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name fedi.vern.cc;
if ($https = '') { return 301 https://$host$request_uri; } # if not connected to HTTPS, perma-redirect to HTTPS
include snippets/lets-encrypt.conf;
include snippets/headers.conf;
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;
include common/bloat.conf;
}