forked from exozyme/nginx
Merge branch 'jellyfin-unix-socket'
This commit is contained in:
commit
bdceefb0d0
1 changed files with 8 additions and 3 deletions
|
@ -3,6 +3,11 @@ server {
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name media.exozy.me;
|
server_name media.exozy.me;
|
||||||
|
|
||||||
|
# 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 unix:/run/jellyfin/jellyfin.sock;
|
||||||
|
|
||||||
include conf.d/ssl;
|
include conf.d/ssl;
|
||||||
|
|
||||||
# Security / XSS Mitigation Headers
|
# Security / XSS Mitigation Headers
|
||||||
|
@ -18,7 +23,7 @@ server {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Proxy main Jellyfin traffic
|
# Proxy main Jellyfin traffic
|
||||||
proxy_pass http://localhost:8096;
|
proxy_pass http://$jellyfin;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
@ -33,7 +38,7 @@ server {
|
||||||
# location block for /web - This is purely for aesthetics so /web/#!/ works instead of having to go to /web/index.html/#!/
|
# location block for /web - This is purely for aesthetics so /web/#!/ works instead of having to go to /web/index.html/#!/
|
||||||
location = /web/ {
|
location = /web/ {
|
||||||
# Proxy main Jellyfin traffic
|
# Proxy main Jellyfin traffic
|
||||||
proxy_pass http://localhost:8096/web/index.html;
|
proxy_pass http://$jellyfin:/web/index.html;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
@ -44,7 +49,7 @@ server {
|
||||||
|
|
||||||
location /socket {
|
location /socket {
|
||||||
# Proxy Jellyfin Websockets traffic
|
# Proxy Jellyfin Websockets traffic
|
||||||
proxy_pass http://localhost:8096;
|
proxy_pass http://$jellyfin;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
Loading…
Reference in a new issue