mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Fix lemmy nginx
This commit is contained in:
parent
ed26516625
commit
91519a558f
2 changed files with 36 additions and 32 deletions
|
|
@ -17,7 +17,6 @@
|
|||
chat = 3008;
|
||||
# dash = 3009;
|
||||
ntfy = 3010;
|
||||
lemmy = 3011;
|
||||
|
||||
search = 8081;
|
||||
videos = 8082;
|
||||
|
|
@ -26,7 +25,8 @@
|
|||
mods.server.local.ports = {
|
||||
# grav = 5001
|
||||
lemmy-api = 5002;
|
||||
pict-rs = 5003;
|
||||
lemmy-ui = 5003;
|
||||
pict-rs = 5004;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ let
|
|||
inherit (lib) mkEnableOption;
|
||||
cfg = config.mods.server.lemmy;
|
||||
port = config.mods.server.local.ports.lemmy-api;
|
||||
port-ui = config.mods.server.nginx.ports.lemmy;
|
||||
port-ui = config.mods.server.local.ports.lemmy-ui;
|
||||
port-pict = config.mods.server.local.ports.pict-rs;
|
||||
hostname = "lemmy.muon.host";
|
||||
bind = "0.0.0.0";
|
||||
|
|
@ -42,10 +42,13 @@ in {
|
|||
address = "0.0.0.0";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${hostname}".locations = let
|
||||
services.nginx.virtualHosts."${hostname}" = let
|
||||
ui = "http://10.0.0.3:${toString port-ui}";
|
||||
backend = "http://10.0.0.3:${toString port}";
|
||||
in lib.mkIf config.mods.server.nginx.enable {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations = {
|
||||
"~ ^/(api|pictrs|feeds|nodeinfo|.well-known)" = {
|
||||
# backend requests
|
||||
proxyPass = backend;
|
||||
|
|
@ -79,5 +82,6 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue