ROCKPro64-Server/system/services/server/webserver/nginx/virtualhosts/example/default.nix

17 lines
358 B
Nix
Raw Normal View History

2025-02-28 12:21:09 -05:00
{ config, lib, ... }:
{
services.nginx.virtualHosts = lib.mkIf config.system.server.enable {
"www.example.com" = {
2025-02-28 12:21:09 -05:00
enableACME = true;
addSSL = true;
default = true;
root = "/var/www/landing-page";
};
"example.com" = {
2025-02-28 12:21:09 -05:00
enableACME = true;
addSSL = true;
globalRedirect = "www.example.com";
2025-02-28 12:21:09 -05:00
};
};
}