X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fnginx%2Fpeertube;h=a17868c5a6563c32adcb2d1779459effca5b57d8;hb=c2a89b70ce75c4955cbdb1ced6fd20a5010a8c9b;hp=50d3a919feb5a30aadedbadfd6bb52ae9e8db7ad;hpb=1a5fd848b461aac6ea1ec1d2bee62032024ba49d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/nginx/peertube b/support/nginx/peertube index 50d3a919f..a17868c5a 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -33,6 +33,8 @@ server { ssl_session_tickets off; # Requires nginx >= 1.5.9 ssl_stapling on; # Requires nginx >= 1.3.7 ssl_stapling_verify on; # Requires nginx => 1.3.7 + # HSTS (https://hstspreload.org), requires to be copied in 'location' sections that have add_header directives + #add_header Strict-Transport-Security "max-age=63072000; includeSubDomains"; # Configure with your resolvers # resolver $DNS-IP-1 $DNS-IP-2 valid=300s; @@ -49,12 +51,6 @@ server { # See https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path # client_body_temp_path /var/www/peertube/storage/nginx/; - # Enable HSTS - # Tells browsers to stick with HTTPS and never visit the insecure HTTP - # version. Once a browser sees this header, it will only visit the site over - # HTTPS for the next 2 years: (read more on hstspreload.org) - #add_header Strict-Transport-Security "max-age=63072000; includeSubDomains"; - access_log /var/log/nginx/peertube.example.com.access.log; error_log /var/log/nginx/peertube.example.com.error.log; @@ -156,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;