jellyfin.subdomain.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ## Version 2020/12/09
  2. # make sure that your dns has a cname set for jellyfin
  3. # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is
  4. # if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"
  5. # or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of jellyfin
  6. # in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is,
  7. # and set the "Secure connection mode" to "Handled by reverse proxy"
  8. server {
  9. listen 443 ssl;
  10. listen [::]:443 ssl;
  11. server_name jellyfin.*;
  12. include /config/nginx/ssl.conf;
  13. client_max_body_size 0;
  14. location / {
  15. include /config/nginx/proxy.conf;
  16. resolver 127.0.0.11 valid=30s;
  17. set $upstream_app jellyfin;
  18. set $upstream_port 8096;
  19. set $upstream_proto http;
  20. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  21. proxy_set_header Range $http_range;
  22. proxy_set_header If-Range $http_if_range;
  23. }
  24. location ~ (/jellyfin)?/socket {
  25. include /config/nginx/proxy.conf;
  26. resolver 127.0.0.11 valid=30s;
  27. set $upstream_app jellyfin;
  28. set $upstream_port 8096;
  29. set $upstream_proto http;
  30. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  31. }
  32. }