Configure Nginx reverse proxy for Jellyfin
This commit is contained in:
parent
e6678ec729
commit
8ea9b6649d
1 changed files with 29 additions and 11 deletions
|
@ -1,5 +1,9 @@
|
|||
{
|
||||
services = {
|
||||
services =
|
||||
let
|
||||
port = 8096;
|
||||
in
|
||||
{
|
||||
jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
@ -7,10 +11,24 @@
|
|||
configDir = "/mnt/media/jellyfin";
|
||||
};
|
||||
|
||||
caddy.virtualHosts."jellyfin.oliverdavies.uk" = {
|
||||
nginx.virtualHosts."jellyfin.oliverdavies.uk" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "oliverdavies.uk";
|
||||
|
||||
extraConfig = "reverse_proxy localhost:8096";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Protocol $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
proxy_buffering off;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue