diff --git a/upstart-jobs/apache-httpd/default.nix b/upstart-jobs/apache-httpd/default.nix index 9afe278398c..5c93a674da1 100644 --- a/upstart-jobs/apache-httpd/default.nix +++ b/upstart-jobs/apache-httpd/default.nix @@ -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 }; diff --git a/upstart-jobs/apache-httpd/subversion.nix b/upstart-jobs/apache-httpd/subversion.nix index 3d28d4850ae..d561cd4c652 100644 --- a/upstart-jobs/apache-httpd/subversion.nix +++ b/upstart-jobs/apache-httpd/subversion.nix @@ -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;