From 61b20252a087e6403b34ef9bdc4fe6fb05936dfb Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 2 Mar 2020 21:00:45 +0100 Subject: Add Nginx configuration to redirect videos to an s3 bucket --- support/nginx/peertube | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'support/nginx') diff --git a/support/nginx/peertube b/support/nginx/peertube index 14e60ed7d..a17868c5a 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -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 ; + #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; -- cgit v1.2.3