Compare commits

..

No commits in common. "092e9f6cb170e273d81100822a3026a92ce0f55c" and "a59b38b2da8986708fa8aad82a263ee725c15fde" have entirely different histories.

4 changed files with 7 additions and 78 deletions

View File

@ -6,7 +6,7 @@ services:
- BASE_URL - BASE_URL
- EMAIL - EMAIL
volumes: volumes:
- ./nginx.conf:/web/fileserver.conf - ./nginx.conf:/web/sonarr.conf
- sites:/sites/ - sites:/sites/
- certs:/etc/letsencrypt/ - certs:/etc/letsencrypt/
- certbotroot:/var/www/certbot/ - certbotroot:/var/www/certbot/

View File

@ -2,12 +2,11 @@ server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
root /files;
autoindex on; autoindex on;
autoindex_exact_size off; autoindex_exact_size off;
autoindex_localtime on; autoindex_localtime on;
sendfile on; location / {
tcp_nopush on; root /files;
}
} }

View File

@ -17,8 +17,6 @@ server {
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
location / { location / {
proxy_pass http://fileserver; grpc_pass http://fileserver;
proxy_max_temp_file_size 0;
} }
} }

View File

@ -1,7 +1,3 @@
proxy_cache_path /var/cache/nginx/jellyfin-videos levels=1:2 keys_zone=jellyfin-videos:100m inactive=90d max_size=35000m;
map $request_uri $h264Level { ~(h264-level=)(.+?)& $2; }
map $request_uri $h264Profile { ~(h264-profile=)(.+?)& $2; }
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
@ -20,74 +16,10 @@ server {
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem; ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
client_max_body_size 20M;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "0";
add_header X-Content-Type-Options "nosniff";
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=(), serial=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always;
location = / {
return 302 http://$host/web/;
}
location / { location / {
proxy_pass http://jellyfin:8096; proxy_pass http://jellyfin:8096;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_buffering off;
}
location = /web/ {
proxy_pass http://jellyfin:8096/web/index.html;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
location /socket {
proxy_pass http://jellyfin:8096;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
location ~* ^/Videos/(.*)/(?!live) {
proxy_pass http://jellyfin:8096;
slice 2m;
proxy_cache jellyfin-videos;
proxy_cache_valid 200 206 301 302 30d;
proxy_ignore_headers Expires Cache-Control Set-Cookie X-Accel-Expires;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_connect_timeout 15s;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Range $slice_range;
proxy_cache_lock on;
proxy_cache_lock_age 60s;
proxy_cache_key "jellyvideo$uri?MediaSourceId=$arg_MediaSourceId&VideoCodec=$arg_VideoCodec&AudioCodec=$arg_AudioCodec&AudioStreamIndex=$arg_AudioStreamIndex&VideoBitrate=$arg_VideoBitrate&AudioBitrate=$arg_AudioBitrate&SubtitleMethod=$arg_SubtitleMethod&TranscodingMaxAudioChannels=$arg_TranscodingMaxAudioChannels&RequireAvc=$arg_RequireAvc&SegmentContainer=$arg_SegmentContainer&MinSegments=$arg_MinSegments&BreakOnNonKeyFrames=$arg_BreakOnNonKeyFrames&h264-profile=$h264Profile&h264-level=$h264Level&slicerange=$slice_range";
} }
} }