Apache directory options
[hcoop/domtool2.git] / src / plugins / apache.sml
index 878204b..f497825 100644 (file)
@@ -126,6 +126,11 @@ val cond_flag = fn (EVar "cond_nocase", _) => SOME "NC"
            | (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
 
@@ -303,4 +308,58 @@ val () = Env.action_three "rewriteCond"
                                 write "]");
              write "\n"))
 
+val () = Env.action_two "alias"
+        ("from", Env.string, "to", Env.string)
+        (fn (from, to) =>
+            (write "\tAlias\t";
+             write from;
+             write " ";
+             write to;
+             write "\n"))
+
+val () = Env.action_two "scriptAlias"
+        ("from", Env.string, "to", Env.string)
+        (fn (from, to) =>
+            (write "\tScriptAlias\t";
+             write from;
+             write " ";
+             write to;
+             write "\n"))
+
+val () = Env.action_two "errorDocument"
+        ("code", Env.string, "handler", Env.string)
+        (fn (code, handler) =>
+            (write "\tErrorDocument\t";
+             write code;
+             write " ";
+             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