redirect browsers to main page if connecting to mail server vhost
This commit is contained in:
parent
798e10bb07
commit
29b14ef74e
12
email.nix
12
email.nix
@ -26,4 +26,16 @@ in {
|
||||
certificateFile = "/var/lib/acme/${root_host}/fullchain.pem";
|
||||
keyFile = "/var/lib/acme/${root_host}/key.pem";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."${mail_host}" = { # you should NOT be here from a browser :P
|
||||
serverName = mail_host;
|
||||
forceSSL = true;
|
||||
useACMEHost = root_host;
|
||||
locations."/" = {
|
||||
return = "307 https://${root_host}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user