feat: new nginx configuration
This commit is contained in:
parent
362d2098bf
commit
3651ddb6cb
1 changed files with 20 additions and 5 deletions
|
@ -1,6 +1,21 @@
|
|||
{...}:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
};
|
||||
{pkgs, ...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."localhost" = {
|
||||
root = "/srv/public";
|
||||
locations = {
|
||||
"/" = {
|
||||
root = "/srv/public";
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
listenAddresses = [
|
||||
"127.0.0.1"
|
||||
"[::1]"
|
||||
];
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [80];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue