]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/nginx/peertube
Create redundancy endpoint
[github/Chocobozzz/PeerTube.git] / support / nginx / peertube
index b0003113371fb5601ee3783a32f5582b0dd33127..e0b0060883945cafa796591c423469d38602af07 100644 (file)
@@ -105,7 +105,7 @@ server {
   }
 
   # Bypass PeerTube for performance reasons. Could be removed
-  location /static/webseed {
+  location ~ ^/static/(webseed|redundancy)/ {
     # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client
     limit_rate 800k;
 
@@ -128,7 +128,12 @@ server {
       access_log off;
     }
 
-    alias /var/www/peertube/storage/videos;
+    root /var/www/peertube/storage;
+
+    rewrite ^/static/webseed/(.*)$ /videos/$1 break;
+    rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break;
+
+    try_files $uri /;
   }
 
   # Websocket tracker