1
0
Fork 0
forked from exozyme/nginx

Update tube.conf

This commit is contained in:
Anthony Wang 2021-05-23 21:50:20 +00:00 committed by GitHub
parent 67f10f2182
commit bac582c57d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ server {
location /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/certbot;
root /var/lib/certbot;
}
location / { return 301 https://$host$request_uri; }
}
@ -36,7 +36,7 @@ server {
location ^~ '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/certbot;
root /var/lib/certbot;
}
##
@ -130,7 +130,7 @@ server {
# For extra performance please refer to https://github.com/denji/nginx-tuning
##
root /var/www/peertube/storage;
root /var/lib/peertube/storage;
# Enable compression for JS/CSS/HTML, for improved client load times.
# It might be nice to compress JSON/XML as returned by the API, but
@ -161,14 +161,14 @@ server {
# If you have a small /var/lib partition, it could be interesting to store temp nginx uploads in a different place
# 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/;
#client_body_temp_path /var/lib/peertube/storage/nginx/;
# Bypass PeerTube for performance reasons. Optional.
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png))$ {
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
root /var/www/peertube;
root /var/lib/peertube;
try_files /storage/client-overrides/$1 /peertube-latest/client/dist/$1 @api;
}
@ -177,7 +177,7 @@ server {
location ~ ^/client/(.*\.(js|css|png|svg|woff2|otf|ttf|woff|eot))$ {
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
alias /var/www/peertube/peertube-latest/client/dist/$1;
alias /var/lib/peertube/peertube-latest/client/dist/$1;
}
# Bypass PeerTube for performance reasons. Optional.