darkreeper

jellyfin subdomain conf

Dec 8th, 2020 (edited)
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.47 KB | None | 0 0
  1. # make sure that your dns has a cname set for jellyfin
  2. # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is
  3. # if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"
  4. # or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of jellyfin
  5. # in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is,
  6. # and set the "Secure connection mode" to "Handled by reverse proxy"
  7.  
  8. server {
  9.     listen 443 ssl;
  10.     listen [::]:443 ssl;
  11.  
  12.     server_name jf.*;
  13.  
  14.     include /config/nginx/ssl.conf;
  15.  
  16.     client_max_body_size 0;
  17.  
  18.     location / {
  19.         include /config/nginx/proxy.conf;
  20.         resolver 127.0.0.11 valid=30s;
  21.         set $upstream_app 192.168.33.23;
  22.         set $upstream_port 8096;
  23.         set $upstream_proto http;
  24.         proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  25.  
  26.         proxy_set_header Range $http_range;
  27.         proxy_set_header If-Range $http_if_range;
  28.     }
  29.  
  30.     location ~ (/jellyfin)?/socket {
  31.         include /config/nginx/proxy.conf;
  32.         resolver 127.0.0.11 valid=30s;
  33.         set $upstream_app jellyfin;
  34.         set $upstream_port 8096;
  35.         set $upstream_proto http;
  36.         proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  37.  
  38.         proxy_set_header Upgrade $http_upgrade;
  39.         proxy_set_header Connection $http_connection;
  40.    }
  41. }
Add Comment
Please, Sign In to add comment