whatever
This commit is contained in:
parent
be9fb9278e
commit
b8af0e9761
165 changed files with 1815 additions and 1431 deletions
32
hosts/abacus/nginx.nix
Normal file
32
hosts/abacus/nginx.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
commonHttpConfig = ''
|
||||
error_log stderr;
|
||||
access_log /var/log/nginx/access.log;
|
||||
'';
|
||||
|
||||
virtualHosts =
|
||||
let
|
||||
matchAll = ''~.*'';
|
||||
matchWww = ''~^www\.(?<domain>.+)$'';
|
||||
in
|
||||
{
|
||||
# Redirect anything that doesn't match any server name to networking.domain
|
||||
${matchAll} = {
|
||||
default = true;
|
||||
rejectSSL = true;
|
||||
|
||||
globalRedirect = "wrz.one";
|
||||
};
|
||||
# Redirect www to non-www
|
||||
${matchWww}.globalRedirect = "$domain";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue