Add Nginx configuration to redirect videos to an s3 bucket
authorRigel Kent <sendmemail@rigelk.eu>
Mon, 2 Mar 2020 20:00:45 +0000 (21:00 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 9 Mar 2020 08:41:29 +0000 (09:41 +0100)
support/nginx/peertube

index 14e60ed7dccfe5f51f931c0857f1eec9b8be8b4a..a17868c5a6563c32adcb2d1779459effca5b57d8 100644 (file)
@@ -152,6 +152,14 @@ server {
 
     root /var/www/peertube/storage;
 
+    # Use this in tandem with fuse-mounting i.e. https://docs.joinpeertube.org/#/admin-remote-storage
+    # to serve files directly from a public bucket without proxying.
+    # Assumes you have buckets named after the storage subdirectories, i.e. 'videos', 'redundancy', etc.
+    #set $cdn <your S3-compatiable bucket public url mounted via fuse>;
+    #rewrite ^/static/webseed/(.*)$ $cdn/videos/$1 redirect;
+    #rewrite ^/static/redundancy/(.*)$ $cdn/redundancy/$1 redirect;
+    #rewrite ^/static/streaming-playlists/(.*)$ $cdn/streaming-playlists/$1 redirect;
+
     rewrite ^/static/webseed/(.*)$ /videos/$1 break;
     rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break;
     rewrite ^/static/streaming-playlists/(.*)$ /streaming-playlists/$1 break;