extern val directoryIndex : [no_spaces] -> [^Vhost];
{{Give the list of filenames to try for the default page of a directory, to be
considered in the order given.}}
+
+extern val forceType : no_spaces -> [Location];
+extern val forceTypeOff : [Location];
+{{Force all files in the current directory to be served with the given MIME
+ type.}}
+
+extern val action : no_spaces -> location -> [^Vhost];
+{{See <a href="http://httpd.apache.org/docs/2.0/mod/mod_actions.html#action">the
+ Apache documentation</a>.}}
+
+extern val addDefaultCharset : no_spaces -> [^Vhost];
+{{See <a href="http://httpd.apache.org/docs/2.0/mod/core.html#adddefaultcharset">the
+ Apache documentation</a>.}}
(b, NONE)
else
let
+ val _ = ErrorMsg.reset ()
val prog = Parse.parse fname
in
if !ErrorMsg.anyErrors then
(* The main parsing routine *)
fun parse filename =
- let val _ = ErrorMsg.fileName := filename
+ let val _ = (ErrorMsg.fileName := filename)
val file = TextIO.openIn filename
fun get _ = TextIO.input file
fun parseerror(s,p1,p2) = ErrorMsg.error (SOME (p1,p2)) s
val () = Env.action_none "satisfyAny"
(fn () => write "\tSatisfy any\n")
+val () = Env.action_one "forceType"
+ ("type", Env.string)
+ (fn ty => (write "\tForceType ";
+ write ty;
+ write "\n"))
+
+val () = Env.action_none "forceTypeOff"
+ (fn () => write "\tForceType None\n")
+
+val () = Env.action_two "action"
+ ("what", Env.string, "how", Env.string)
+ (fn (what, how) => (write "\tAction ";
+ write what;
+ write " ";
+ write how;
+ write "\n"))
+
+val () = Env.action_one "addDefaultCharset"
+ ("charset", Env.string)
+ (fn ty => (write "\tAddDefaultCharset ";
+ write ty;
+ write "\n"))
+
end
DocumentRoot = "/home/adamc/html";
ServerAdmin = "adamc@hcoop.net"
with
-
+ addDefaultCharset "mumbo-jumbo/incomprehensible"
end;
vhost "members" where
scriptAlias "/cgi-bin/that-script" "/home/adamc/cgi/here-it-is";
errorDocument "404" "I just couldn't find it.";
+ action "text/plain" "/cgi-bin/display";
+
directory "/home/adamc/thisPlace" with
rewriteRule "A" "B" [];
unset_options [includesNOEXEC];
proxyPass "/mailman" "http://hcoop.net/cgi-bin/mailman";
alias "/doc/mailman" "/home/adamc/mailman";
+ location "/the-citadel" with
+ forceTypeOff;
+ end;
+
directoryIndex ["index.sml", "index.h", "index.v"]
end;
requireUser ["freddy", "flicky"];
requireGroup ["awesome"];
+ forceType "text/html";
+
orderDenyAllow;
satisfyAny
end