1
0
Fork 0
forked from exozyme/nginx

Stop PeerTube journal spam by specifying ::1 instead of localhost

This commit is contained in:
Anthony Wang 2023-07-07 00:55:56 +00:00
parent d7e4151476
commit 482db51233
Signed by untrusted user: a
GPG key ID: 42A5B952E6DD8D38
2 changed files with 9 additions and 6 deletions

View file

@ -3,7 +3,7 @@ map $http_upgrade $connection_upgrade {
'' close;
}
upstream backend {
upstream web {
server unix:/run/mastodon/mastodon-web.sock fail_timeout=0;
}
@ -124,7 +124,7 @@ server {
proxy_set_header Proxy "";
proxy_pass_header Server;
proxy_pass http://backend;
proxy_pass http://web;
proxy_buffering on;
proxy_redirect off;
proxy_http_version 1.1;

View file

@ -3,11 +3,14 @@
# STANDARD HTTP MODULES: Core, Proxy, Rewrite, Access, Gzip, Headers, HTTP/2, Log, Real IP, SSL, Thread Pool, Upstream, AIO Multithreading.
# THIRD PARTY MODULES: None.
upstream backend {
server [::1]:9000; # https://framacolibri.org/t/listen-to-unix-socket-instead-of-localhost-9000/5348
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name tube.exozy.me;
##
# Certificates
# you need a certificate to run in production. see https://letsencrypt.org/
@ -30,7 +33,7 @@ server {
proxy_read_timeout 10m;
send_timeout 10m;
proxy_pass http://localhost:9000;
proxy_pass http://backend;
}
location / {
@ -78,7 +81,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:9000;
proxy_pass http://backend;
}
location /socket.io {
@ -184,7 +187,7 @@ server {
proxy_limit_rate 5M;
proxy_pass http://localhost:9000;
proxy_pass http://backend;
}
# Bypass PeerTube for performance reasons. Optional.