Add captive portal detection service
This commit is contained in:
parent
ad7acad5bd
commit
f8d69b1784
@ -12,6 +12,7 @@
|
||||
./ip.nix
|
||||
./meow.nix
|
||||
./milchinsel.nix
|
||||
./ping.nix
|
||||
./prediger.nix
|
||||
./public.nix
|
||||
./radicale.nix
|
||||
|
29
hosts/web-2/ping.nix
Normal file
29
hosts/web-2/ping.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
services.nginx.virtualHosts = {
|
||||
"ping.clerie.de" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."= /" = {
|
||||
return = ''200 "This domain is used for connectivity checking and captive portal detection\n"'';
|
||||
extraConfig = ''
|
||||
types { } default_type "text/plain; charset=utf-8";
|
||||
'';
|
||||
};
|
||||
locations."/nm-check.txt" = {
|
||||
return = ''200 "NetworkManager is online\n"'';
|
||||
extraConfig = ''
|
||||
types { } default_type "text_plain; charset=utf-8";
|
||||
add_header Cache-Control "max-age=0, must-revalidate";
|
||||
'';
|
||||
};
|
||||
locations."/" = {
|
||||
return = ''404'';
|
||||
};
|
||||
extraConfig = ''
|
||||
access_log off;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user