aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/nginx/peertube
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-06 12:26:58 +0100
committerChocobozzz <me@florianbigard.com>2019-02-06 12:26:58 +0100
commit73471b1a52f242e86364ffb077ea6cadb3b07ae2 (patch)
tree43dbb7748e281f8d80f15326f489cdea10ec857d /support/nginx/peertube
parentc22419dd265c0c7185bf4197a1cb286eb3d8ebc0 (diff)
parentf5305c04aae14467d6f957b713c5a902275cbb89 (diff)
downloadPeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.tar.gz
PeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.tar.zst
PeerTube-73471b1a52f242e86364ffb077ea6cadb3b07ae2.zip
Merge branch 'release/v1.2.0'
Diffstat (limited to 'support/nginx/peertube')
-rw-r--r--support/nginx/peertube33
1 files changed, 30 insertions, 3 deletions
diff --git a/support/nginx/peertube b/support/nginx/peertube
index b00031133..54ffdcc32 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -96,8 +96,18 @@ server {
96 proxy_set_header Host $host; 96 proxy_set_header Host $host;
97 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 97 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
98 98
99 # Hard limit, PeerTube does not support videos > 8GB 99 # This is the maximum upload size, which roughly matches the maximum size of a video file
100 # you can send via the API or the web interface. By default this is 8GB, but administrators
101 # can increase or decrease the limit. Currently there's no way to communicate this limit
102 # to users automatically, so you may want to leave a note in your instance 'about' page if
103 # you change this.
104 #
105 # Note that temporary space is needed equal to the total size of all concurrent uploads.
106 # This data gets stored in /var/lib/nginx by default, so you may want to put this directory
107 # on a dedicated filesystem.
108 #
100 client_max_body_size 8G; 109 client_max_body_size 8G;
110
101 proxy_connect_timeout 600; 111 proxy_connect_timeout 600;
102 proxy_send_timeout 600; 112 proxy_send_timeout 600;
103 proxy_read_timeout 600; 113 proxy_read_timeout 600;
@@ -105,7 +115,7 @@ server {
105 } 115 }
106 116
107 # Bypass PeerTube for performance reasons. Could be removed 117 # Bypass PeerTube for performance reasons. Could be removed
108 location /static/webseed { 118 location ~ ^/static/(webseed|redundancy)/ {
109 # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client 119 # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client
110 limit_rate 800k; 120 limit_rate 800k;
111 121
@@ -128,7 +138,12 @@ server {
128 access_log off; 138 access_log off;
129 } 139 }
130 140
131 alias /var/www/peertube/storage/videos; 141 root /var/www/peertube/storage;
142
143 rewrite ^/static/webseed/(.*)$ /videos/$1 break;
144 rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break;
145
146 try_files $uri /;
132 } 147 }
133 148
134 # Websocket tracker 149 # Websocket tracker
@@ -143,4 +158,16 @@ server {
143 proxy_set_header Host $host; 158 proxy_set_header Host $host;
144 proxy_pass http://localhost:9000; 159 proxy_pass http://localhost:9000;
145 } 160 }
161
162 location /socket.io {
163 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
164 proxy_set_header Host $host;
165
166 proxy_pass http://localhost:9000;
167
168 # enable WebSockets
169 proxy_http_version 1.1;
170 proxy_set_header Upgrade $http_upgrade;
171 proxy_set_header Connection "upgrade";
172 }
146} 173}