mail working
This commit is contained in:
parent
bc5f851d3f
commit
99394cb573
8 changed files with 204 additions and 73 deletions
|
|
@ -9,10 +9,49 @@
|
|||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
"${config.networking.domain}" = {
|
||||
onlySSL = true;
|
||||
useACMEHost = config.networking.domain;
|
||||
locations."/" = {
|
||||
return = "200 'This domain used for e-mail hosting only.'";
|
||||
extraConfig = ''
|
||||
add_header Content-Type text/plain;
|
||||
'';
|
||||
};
|
||||
};
|
||||
"${config.networking.fqdn}-80" = {
|
||||
serverAliases = [ "*.ktiu.net" ];
|
||||
locations."/.well-known/acme-challenge" = {
|
||||
root = "/var/lib/acme/.challenges";
|
||||
};
|
||||
locations."/" = {
|
||||
return = "301 https://$host$request_uri";
|
||||
};
|
||||
};
|
||||
"${config.networking.fqdn}" = {
|
||||
onlySSL = true;
|
||||
useACMEHost = config.networking.domain;
|
||||
locations."/" = {
|
||||
return = "404";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
|
||||
acceptTerms = true;
|
||||
defaults.email = "till@ktiu.net";
|
||||
|
||||
certs."${config.networking.domain}" = {
|
||||
domain = config.networking.domain;
|
||||
webroot = "/var/lib/acme/.challenges";
|
||||
group = config.services.nginx.group;
|
||||
extraDomainNames = [ config.networking.fqdn ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue