* Virtual hosts: inherit adminAddr from the main server.

svn path=/nixos/trunk/; revision=10756
This commit is contained in:
Eelco Dolstra 2008-02-19 14:54:19 +00:00
parent d7dd9179ce
commit a2c20a9d29
2 changed files with 8 additions and 1 deletions

View file

@ -3,6 +3,8 @@
let
cfg = config.services.httpd;
mainCfg = cfg;
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
@ -16,6 +18,11 @@ let
canonicalName =
"http://${cfg.hostName}" +
(if cfg.httpPort != 80 then ":${toString cfg.httpPort}" else "");
# Admin address: inherit from the main server if not specified for
# a virtual host.
adminAddr = if cfg.adminAddr != "" then cfg.adminAddr else mainCfg.adminAddr;
serverConfig = cfg;
fullConfig = config; # machine config
};

View file

@ -13,7 +13,7 @@ let
logDir = "${config.dataDir}/log";
postCommitHook = "/var/run/current-system/sw/bin/svn-server-post-commit-hook";
fsType = "fsfs";
adminAddr = serverInfo.serverConfig.adminAddr;
adminAddr = serverInfo.adminAddr;