in
{
config = lib.mkIf cfg.enable {
- services.websites.webappDirs = {
- _mta-sts = root;
- };
-
services.websites.env.tools.vhostConfs.mta_sts = {
certName = "mail";
addToCerts = true;
hosts = ["mta-sts.mail.immae.eu"] ++ map (v: "mta-sts.${v.domain}") domains;
- root = "/run/current-system/webapps/_mta-sts";
+ root = root;
extraConfig = [
''
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mta-sts.(.*)$
RewriteRule ^/.well-known/mta-sts.txt$ %{DOCUMENT_ROOT}/%1.txt [L]
- <Directory /run/current-system/webapps/_mta-sts>
+ <Directory ${root}>
Require all granted
Options -Indexes
</Directory>