X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/cd04086681583dd3fcc95b6e12ba312054dc590e..781ebc11c3ab9b359cd0ee1cc653bd8f223a0bd8:/src/plugins/apache.sml diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index e81792a..617420a 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -111,6 +111,15 @@ fun ssl e = case e of | (EApp ((EVar "use_cert", _), s), _) => Option.map SOME (Env.string s) | _ => NONE +fun validExtension s = + size s > 0 + andalso size s < 20 + andalso CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"_") s + +val _ = Env.type_one "file_extension" + Env.string + validExtension + val defaults = [("WebPlaces", (TList (TBase "web_place", dl), dl), (fn () => (EList (map webPlaceDefault Config.Apache.webNodes_default), dl))), @@ -706,6 +715,12 @@ val () = Env.action_one "unset_options" app (fn opt => (write " -"; write opt)) opts; write "\n")) +val () = Env.action_one "cgiExtension" + ("extension", Env.string) + (fn ext => (write "\tAddHandler cgi-script "; + write ext; + write "\n")) + val () = Env.action_one "directoryIndex" ("filenames", Env.list Env.string) (fn opts =>