MyNixOS website logo
option

services.httpd.virtualHosts

Specification of the virtual hosts served by Apache. Each element should be an attribute set specifying the configuration of the virtual host.

Declarations
Type
attribute set of (submodule)
Default
{
  localhost = {
    documentRoot = "${package.out}/htdocs";
  };
}
Example
{
  "foo.example.com" = {
    forceSSL = true;
    documentRoot = "/var/www/foo.example.com"
  };
  "bar.example.com" = {
    addSSL = true;
    documentRoot = "/var/www/bar.example.com";
  };
}