val dnsIP = \from -> \to -> dns (dnsA from to);
val dnsMail = \num -> \host -> dns (dnsMX num host);
val dnsAlias = \from -> \to -> dns (dnsCNAME from to);
+val dnsDefault = \to -> dns (dnsDefaultA to);
--- /dev/null
+{{Support for Apache's mod_env, which deals with UNIX environment variables}}
+
+extern val setEnv : no_spaces -> no_spaces -> [^Vhost];
+{{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv">the
+ Apache documentation</a>.}}
val _ = Env.type_one "no_spaces"
Env.string
- (CharVector.all (fn ch => not (Char.isSpace ch)))
+ (CharVector.all (fn ch => not (Char.isSpace ch) andalso ch <> #"\"" andalso ch <> #"'"))
val _ = Env.type_one "no_newlines"
Env.string
- (CharVector.all (fn ch => ch <> #"\n" andalso ch <> #"\r"))
+ (CharVector.all (fn ch => ch <> #"\n" andalso ch <> #"\r" andalso ch <> #"\"" andalso ch <> #"'"))
val _ = Env.type_one "ip"
Env.string
write name;
write "\n"))
+val () = Env.action_two "setEnv"
+ ("key", Env.string, "value", Env.string)
+ (fn (key, value) => (write "\tSetEnv \"";
+ write key;
+ write "\" \"";
+ write value;
+ write "\"\n"))
+
val () = Domain.registerResetLocal (fn () =>
ignore (OS.Process.system (Config.rm ^ " -rf /var/domtool/vhosts/*")))