aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/production.md21
1 files changed, 18 insertions, 3 deletions
diff --git a/support/doc/production.md b/support/doc/production.md
index 716f42fbc..2d746bba5 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -56,8 +56,8 @@ Copy the nginx configuration template:
56$ sudo cp /home/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube 56$ sudo cp /home/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
57``` 57```
58 58
59Then modify the webserver configuration file. Please pay attention to the `alias` key of `/static/webseed` location. 59Then modify the webserver configuration file. Please pay attention to the `alias` keys of the static locations.
60It should correspond to the path of your videos directory (set in the configuration file as `storage->videos` key). 60It should correspond to the paths of your storage directories (set in the configuration file inside the `storage` key).
61 61
62``` 62```
63$ sudo vim /etc/nginx/sites-available/peertube 63$ sudo vim /etc/nginx/sites-available/peertube
@@ -97,6 +97,18 @@ server {
97 root /var/www/certbot; 97 root /var/www/certbot;
98 } 98 }
99 99
100 location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
101 add_header Cache-Control "public, max-age=31536000, immutable";
102
103 alias /home/peertube/peertube-latest/client/dist/$1;
104 }
105
106 location ~ ^/static/(thumbnails|avatars|previews)/(.*)$ {
107 add_header Cache-Control "public, max-age=31536000, immutable";
108
109 alias /home/peertube/storage/$1/$2;
110 }
111
100 location / { 112 location / {
101 proxy_pass http://localhost:9000; 113 proxy_pass http://localhost:9000;
102 proxy_set_header X-Real-IP $remote_addr; 114 proxy_set_header X-Real-IP $remote_addr;
@@ -127,6 +139,9 @@ server {
127 add_header 'Access-Control-Allow-Origin' '*'; 139 add_header 'Access-Control-Allow-Origin' '*';
128 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; 140 add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
129 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; 141 add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
142
143 # Don't spam access log file with byte range requests
144 access_log off;
130 } 145 }
131 146
132 alias /home/peertube/storage/videos; 147 alias /home/peertube/storage/videos;
@@ -219,7 +234,7 @@ The administrator password is automatically generated and can be found in the
219logs. You can set another password with: 234logs. You can set another password with:
220 235
221``` 236```
222$ NODE_ENV=production npm run reset-password -- -u root 237$ cd /home/peertube/peertube-latest && NODE_ENV=production npm run reset-password -- -u root
223``` 238```
224 239
225## Upgrade 240## Upgrade