listen for ssl connections to reject

This commit is contained in:
jaina heartles 2024-10-10 01:43:48 -04:00
parent 17aa3246df
commit 6bb66f3e21

View file

@ -4,7 +4,7 @@
enable = true; enable = true;
# ꙮ.run # ꙮ.run
virtualHosts."xn--xx8a.run" = { virtualHosts = let
listen = [ listen = [
{ {
addr = "0.0.0.0"; addr = "0.0.0.0";
@ -15,9 +15,21 @@
addr = "[::]"; addr = "[::]";
} }
# deliberately avoid listening with https # deliberately avoid listening with https
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
{
port = 443;
ssl = true;
addr = "[::]";
}
]; ];
rejectSSL = true; rejectSSL = true;
in {
"xn--xx8a.run" = {
inherit listen rejectSSL;
root = "/srv/ogdo"; root = "/srv/ogdo";
extraConfig = '' extraConfig = ''
@ -36,38 +48,15 @@
}; };
}; };
virtualHosts."ogdo.run" = { "ogdo.run" = {
listen = [ inherit listen rejectSSL;
{
addr = "0.0.0.0";
port = 80;
}
{
port = 80;
addr = "[::]";
}
];
rejectSSL = true;
locations."/".return = "301 http://xn--xx8a.run$request_uri"; locations."/".return = "301 http://xn--xx8a.run$request_uri";
}; };
virtualHosts.".run" = { ".run" = {
listen = [ inherit listen rejectSSL;
{
addr = "0.0.0.0";
port = 80;
}
{
port = 80;
addr = "[::]";
}
];
rejectSSL = true;
locations."/".return = "301 http://ogdo.run$request_uri"; locations."/".return = "301 http://ogdo.run$request_uri";
}; };
}; };
};
} }