fix: use serverAliases option
parent
96d7fb67ae
commit
3ecebeabcb
|
@ -18,11 +18,14 @@ in
|
|||
};
|
||||
|
||||
# Reverse proxy with Caddy
|
||||
services.caddy.virtualHosts."${homeserver-url}, ${homeserver-url}:8448".extraConfig = ''
|
||||
services.caddy.virtualHosts."${homeserver-url}" = {
|
||||
serverAliases = [ "${homeserver-url}:8448" ];
|
||||
extraConfig = ''
|
||||
respond /.well-known/matrix/server `{ "m.server": "${homeserver-url}" }` 200
|
||||
respond /.well-known/matrix/client `{ "m.homeserver": { "base_url": "https://${homeserver-url}" } }` 200
|
||||
reverse_proxy /_matrix/* localhost:${toString config.services.matrix-conduit.settings.global.port}
|
||||
'';
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 8448 ];
|
||||
|
|
Loading…
Reference in New Issue