initial commit
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
# Jellyfin runs on the host network (not Docker shared network) because it
|
||||
# needs direct access to hardware transcoding devices. Proxied via
|
||||
# host.docker.internal instead of container name.
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name jellyfin.timothykim.net;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
server_name jellyfin.timothykim.net;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/jellyfin.timothykim.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/jellyfin.timothykim.net/privkey.pem;
|
||||
|
||||
include /etc/nginx/conf.d/security-headers.inc;
|
||||
|
||||
# Poster and metadata image uploads
|
||||
client_max_body_size 20M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://host.docker.internal:8096;
|
||||
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;
|
||||
|
||||
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
|
||||
proxy_buffering off;
|
||||
|
||||
# Jellyfin uses WebSockets for real-time playback state and remote control
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# Dedicated WebSocket endpoint for SyncPlay and client communication
|
||||
location /socket {
|
||||
proxy_pass http://host.docker.internal:8096;
|
||||
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;
|
||||
|
||||
# sync play compatibility?
|
||||
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user