Typo fix & NameVirtualHost generation

svn path=/nixos/trunk/; revision=11710
This commit is contained in:
Michael Raskin 2008-04-24 18:32:05 +00:00
parent f2598a9ca5
commit 7ee619f83d

View File

@ -19,7 +19,7 @@ let
canonicalName = canonicalName =
(if cfg.enableSSL then "https" else "http") + "://" + (if cfg.enableSSL then "https" else "http") + "://" +
cfg.hostName + cfg.hostName +
(if getPort cfg != (if cfg.enableSSL then 443 else 80) then ":${toString getPort cfg}" else ""); (if getPort cfg != (if cfg.enableSSL then 443 else 80) then ":${toString (getPort cfg)}" else "");
# Admin address: inherit from the main server if not specified for # Admin address: inherit from the main server if not specified for
# a virtual host. # a virtual host.
@ -327,8 +327,11 @@ let
${perServerConf true mainCfg} ${perServerConf true mainCfg}
# Always enable virtual hosts; it doesn't seem to hurt. # Always enable virtual hosts; it doesn't seem to hurt.
NameVirtualHost *:80 ${let
NameVirtualHost *:443 ports = map getPort allHosts;
uniquePorts = pkgs.lib.uniqList {inputList = ports;};
in concatMapStrings (port: "NameVirtualHost *:${toString port}\n") uniquePorts
}
${let ${let
makeVirtualHost = vhost: '' makeVirtualHost = vhost: ''