Fix IPv4/IPv6 issue with PeerTube

This commit is contained in:
Anthony Wang 2022-05-21 11:56:50 -05:00
parent e31ccdff72
commit f7f6354327
Signed by untrusted user: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -3,18 +3,11 @@
# 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 tube_backend {
server localhost:9000;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name tube.exozy.me;
access_log /var/log/nginx/peertube.access.log; # reduce I/0 with buffer=10m flush=5m
error_log /var/log/nginx/peertube.error.log;
##
# Certificates
# you need a certificate to run in production. see https://letsencrypt.org/
@ -37,7 +30,7 @@ server {
proxy_read_timeout 10m;
send_timeout 10m;
proxy_pass http://tube_backend;
proxy_pass http://localhost:9000;
}
location / {
@ -85,7 +78,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://tube_backend;
proxy_pass http://localhost:9000;
}
location /socket.io {
@ -140,7 +133,7 @@ server {
# Bypass PeerTube for performance reasons. Optional.
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png))$ {
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png|default-playlist\.jpg|default-avatar-account\.png|default-avatar-video-channel\.png))$ {
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
root /var/lib/peertube;