diff --git a/mastodon.conf b/mastodon.conf index 87294db..73a75eb 100644 --- a/mastodon.conf +++ b/mastodon.conf @@ -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; diff --git a/peertube.conf b/peertube.conf index 424c9a5..932863c 100644 --- a/peertube.conf +++ b/peertube.conf @@ -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.