nginx-configs/conf.d/mastodon.conf

53 lines
1.0 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;
server_name fedi.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion mastodon.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion;
include common/mastodon.conf;
}
server {
listen 11007;
listen [::]:11007;
server_name verncc3ifybf2wvag5sgjmpsdp4lcv3ppuvpnlihcgffuqytkaxa.b32.i2p;
include common/mastodon.conf;
}
server {
listen 80;
listen [::]:80;
server_name fedi.vern.cc;
return 301 https://$host$request_uri;
}
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 common/mastodon.conf;
}