--- /dev/null
+{{Per-directory options for Apache}}
+
+extern type apache_option;
+{{See <a href="http://httpd.apache.org/docs/2.0/mod/core.html#options">the
+ Apache documentation</a> for what the options mean.}}
+
+extern val execCGI : apache_option;
+extern val includesNOEXEC : apache_option;
+extern val indexes : apache_option;
+
+extern val options : [apache_option] -> [^Vhost];
+{{Declare exactly the set of options in effect for the current scope.}}
+
+extern val set_options : [apache_option] -> [^Vhost];
+extern val unset_options : [apache_option] -> [^Vhost];
+{{Specify some options to be set or unset, leaving the rest as they are.}}
+
| (EVar "ornext", _) => SOME "OR"
| _ => NONE
+val apache_option = fn (EVar "execCGI", _) => SOME "ExecCGI"
+ | (EVar "includesNOEXEC", _) => SOME "IncludesNOEXEC"
+ | (EVar "indexes", _) => SOME "Indexes"
+ | _ => NONE
+
val vhostsChanged = ref false
write handler;
write "\n"))
+val () = Env.action_one "options"
+ ("options", Env.list apache_option)
+ (fn opts =>
+ case opts of
+ [] => ()
+ | _ => (write "\tOptions";
+ app (fn opt => (write " "; write opt)) opts;
+ write "\n"))
+
+val () = Env.action_one "set_options"
+ ("options", Env.list apache_option)
+ (fn opts =>
+ case opts of
+ [] => ()
+ | _ => (write "\tOptions";
+ app (fn opt => (write " +"; write opt)) opts;
+ write "\n"))
+
+val () = Env.action_one "unset_options"
+ ("options", Env.list apache_option)
+ (fn opts =>
+ case opts of
+ [] => ()
+ | _ => (write "\tOptions";
+ app (fn opt => (write " -"; write opt)) opts;
+ write "\n"))
end
proxyPass "/proxyLand" "http://localhost:1234/otherProxyLand";
proxyPassReverse "/proxyLand" "http://localhost:1234/otherProxyLand";
+ options [execCGI];
+ set_options [execCGI, indexes];
+
scriptAlias "/cgi-bin/that-script" "/home/adamc/cgi/here-it-is";
errorDocument "404" "I just couldn't find it.";
directory "/home/adamc/thisPlace" with
rewriteRule "A" "B" [];
+ unset_options [includesNOEXEC];
end
end;