feat(services): add nginx with test http response
This commit is contained in:
parent
dee55c8a5a
commit
94e6161c6a
2 changed files with 22 additions and 0 deletions
|
@ -2,5 +2,6 @@
|
|||
imports = [
|
||||
./services/glance.nix
|
||||
./services/wakapi.nix
|
||||
./services/nginx.nix
|
||||
];
|
||||
}
|
||||
|
|
21
configs/services/nginx.nix
Normal file
21
configs/services/nginx.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
defaultListen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 18080;
|
||||
}
|
||||
];
|
||||
virtualHosts = {
|
||||
localhost = {
|
||||
locations."/" = {
|
||||
return = "200 '<html><body>It works</body></html>'";
|
||||
extraConfig = ''
|
||||
default_type text/html;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue