Configure proxy to Jellyfin Unix socket

This commit is contained in:
Anthony Wang 2022-01-22 12:55:49 -06:00
parent d467a544c3
commit 0c5a4532e0
Signed by untrusted user: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -6,7 +6,7 @@ server {
# use a variable to store the upstream proxy
# in this example we are using a hostname which is resolved via DNS
# (if you aren't using DNS remove the resolver line and change the variable to point to an IP address e.g `set $jellyfin localhost`)
set $jellyfin 127.0.0.1;
set $jellyfin unix:/run/jellyfin/jellyfin.sock;
include conf.d/ssl;
@ -27,7 +27,7 @@ server {
location / {
# Proxy main Jellyfin traffic
proxy_pass http://$jellyfin:8096;
proxy_pass http://$jellyfin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -42,7 +42,7 @@ server {
# location block for /web - This is purely for aesthetics so /web/#!/ works instead of having to go to /web/index.html/#!/
location = /web/ {
# Proxy main Jellyfin traffic
proxy_pass http://$jellyfin:8096/web/index.html;
proxy_pass http://$jellyfin:/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;
@ -53,7 +53,7 @@ server {
location /socket {
# Proxy Jellyfin Websockets traffic
proxy_pass http://$jellyfin:8096;
proxy_pass http://$jellyfin;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";