mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Forward acme requests for banditlair.com
This commit is contained in:
parent
df9573573c
commit
f0ff9d3a9f
1 changed files with 11 additions and 10 deletions
|
|
@ -4,7 +4,7 @@ let
|
||||||
let
|
let
|
||||||
join = hostName: domain: hostName + lib.optionalString (domain != null) ".${domain}";
|
join = hostName: domain: hostName + lib.optionalString (domain != null) ".${domain}";
|
||||||
in
|
in
|
||||||
join "matrix" config.networking.domain;
|
join "matrix" config.networking.domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
security.acme.email = "letsencrypt.account@banditlair.com";
|
security.acme.email = "letsencrypt.account@banditlair.com";
|
||||||
|
|
@ -18,6 +18,7 @@ in
|
||||||
"${config.networking.domain}" = {
|
"${config.networking.domain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
acmeFallbackHost = "storage1.banditlair.com";
|
||||||
|
|
||||||
locations."= /.well-known/matrix/server".extraConfig =
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
let
|
let
|
||||||
|
|
@ -25,10 +26,10 @@ in
|
||||||
# the client-server and server-server port for simplicity
|
# the client-server and server-server port for simplicity
|
||||||
server = { "m.server" = "${fqdn}:443"; };
|
server = { "m.server" = "${fqdn}:443"; };
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
add_header Content-Type application/json;
|
add_header Content-Type application/json;
|
||||||
return 200 '${builtins.toJSON server}';
|
return 200 '${builtins.toJSON server}';
|
||||||
'';
|
'';
|
||||||
locations."= /.well-known/matrix/client".extraConfig =
|
locations."= /.well-known/matrix/client".extraConfig =
|
||||||
let
|
let
|
||||||
client = {
|
client = {
|
||||||
|
|
@ -37,11 +38,11 @@ in
|
||||||
};
|
};
|
||||||
# ACAO required to allow element-web on any URL to request this json file
|
# ACAO required to allow element-web on any URL to request this json file
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
add_header Content-Type application/json;
|
add_header Content-Type application/json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
return 200 '${builtins.toJSON client}';
|
return 200 '${builtins.toJSON client}';
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Reverse proxy for Matrix client-server and server-server communication
|
# Reverse proxy for Matrix client-server and server-server communication
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue