{{Set some configuration specific to a URI prefix or filesystem directory,
respectively.}}
-extern val serverAlias : your_domain_host -> [Vhost];
+extern val serverAliasHost : your_domain_host -> [Vhost];
{{Give an alternate hostname for this vhost.}}
+extern val serverAlias : host -> [Vhost];
+{{Like serverAliasHost, but adds an alias for the given hostname at every domain
+ being configured.}}
+extern val serverAliasDefault : [Vhost];
+{{Like serverAliasDefault, but adds aliases for the domains being configured
+ instead of any of their hosts/"subdomains".}}
TextIO.output (file, "/access.log combined\n");
TextIO.output (file, "\tServerName ");
TextIO.output (file, fullHost);
+ app
+ (fn dom => (TextIO.output (file, "\n\tServerAlias ");
+ TextIO.output (file, host);
+ TextIO.output (file, ".");
+ TextIO.output (file, dom)))
+ (Domain.currentAliasDomains ());
if suexec then
if isVersion1 node then
(TextIO.output (file, "\n\tUser ");
app (fn opt => (write " "; write opt)) opts;
write "\n"))
-val () = Env.action_one "serverAlias"
+val () = Env.action_one "serverAliasHost"
("host", Env.string)
(fn host =>
(write "\tServerAlias ";
write "\n";
!aliaser host))
+val () = Env.action_one "serverAlias"
+ ("host", Env.string)
+ (fn host =>
+ (app
+ (fn dom =>
+ let
+ val full = host ^ "." ^ dom
+ in
+ write "\tServerAlias ";
+ write full;
+ write "\n";
+ !aliaser full
+ end)
+ (Domain.currentDomains ())))
+
+val () = Env.action_none "serverAliasDefault"
+ (fn () =>
+ (app
+ (fn dom =>
+ (write "\tServerAlias ";
+ write dom;
+ write "\n";
+ !aliaser dom))
+ (Domain.currentDomains ())))
+
val authType = fn (EVar "basic", _) => SOME "basic"
| (EVar "digest", _) => SOME "digest"
| _ => NONE