1
0
Fork 0
mirror of https://github.com/archtechx/nix.git synced 2025-12-12 11:24:04 +00:00

Add catchall.nix

This commit is contained in:
Samuel Štancl 2025-08-28 17:59:49 +02:00
parent ecf65b125d
commit b091a51ec0
2 changed files with 14 additions and 0 deletions

View file

@ -190,6 +190,13 @@ matching the site's `ssl` config.
Out of the box, if nginx cannot match an incoming request's host to a specific virtual host it will
just use _some_ vhost. You can prevent behavior that by adding a module like this:
> [!NOTE]
> You can also use the `catchall.nix` module here (which includes the code below):
>
> `scp catchall.nix root@<server ip>:/etc/nixos/`
>
> Then just add `./catchall.nix` to your modules array.
```nix
{
services.nginx.virtualHosts."catchall" = {