fix: remove nginx flags and abstract over port
This commit is contained in:
parent
02eacb37e5
commit
fb06a36d6a
1 changed files with 4 additions and 7 deletions
|
@ -1,9 +1,11 @@
|
|||
{ lib, modulesPath, pkgs, ... }:
|
||||
|
||||
let port = 2342;
|
||||
in
|
||||
{
|
||||
services.photoprism = {
|
||||
enable = true;
|
||||
port = 2342;
|
||||
port = port;
|
||||
settings = {
|
||||
PHOTOPRISM_DEFAULT_LOCALE = "fr";
|
||||
PHOTOPRISM_ADMIN_USERNAME = "admin";
|
||||
|
@ -43,13 +45,8 @@
|
|||
forceSSL = true;
|
||||
serverAliases = [];
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:2342/";
|
||||
proxyPass = "http://localhost:${toString port}/";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue