structure Apache :> APACHE_CONFIG = struct
+open ConfigTypes
+
val reload = "/usr/bin/sudo /usr/local/sbin/domtool-publish apache"
val down = "/usr/bin/sudo /usr/local/sbin/domtool-publish apache-down"
val undown = "/usr/bin/sudo /usr/local/sbin/domtool-publish apache-undown"
val confDir = "/var/domtool/vhosts"
-val webNodes_all = [("mire", true)]
-val webNodes_admin = [("deleuze", false)]
+val webNodes_all = [("mire", {version = APACHE_1_3, auth = MOD_WAKLOG})]
+val webNodes_admin = [("deleuze", {version = APACHE_2, auth = NO_AUTH})]
val webNodes_default = ["mire"]
val confDir : string
- val webNodes_all : (string * bool) list
- val webNodes_admin : (string * bool) list
+ val webNodes_all : (string * ConfigTypes.apache_info) list
+ val webNodes_admin : (string * ConfigTypes.apache_info) list
val webNodes_default : string list
val proxyTargets : string list
--- /dev/null
+(* HCoop Domtool (http://hcoop.sourceforge.net/)
+ * Copyright (c) 2007, Adam Chlipala
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *)
+
+(* Datatypes to use in configuration (config.sml et al.) *)
+
+structure ConfigTypes = struct
+
+datatype apache_version =
+ APACHE_1_3
+ | APACHE_2
+
+datatype apache_auth_scheme =
+ NO_AUTH
+ | MOD_WAKLOG
+
+type apache_info = {version : apache_version,
+ auth : apache_auth_scheme}
+
+end
\ No newline at end of file
(* HCoop Domtool (http://hcoop.sourceforge.net/)
- * Copyright (c) 2006, Adam Chlipala
+ * Copyright (c) 2006-2007, Adam Chlipala
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
val webNodes_full = Config.Apache.webNodes_all @ Config.Apache.webNodes_admin
fun isVersion1 node =
- List.exists (fn x => x = (node, true)) webNodes_full
+ List.exists (fn (n, {version = ConfigTypes.APACHE_1_3, ...}) => n = node
+ | _ => false) webNodes_full
fun imVersion1 () = isVersion1 (Slave.hostname ())
+fun isWaklog node =
+ List.exists (fn (n, {auth = ConfigTypes.MOD_WAKLOG, ...}) => n = node
+ | _ => false) webNodes_full
+
fun down () = if imVersion1 () then Config.Apache.down1 else Config.Apache.down
fun undown () = if imVersion1 () then Config.Apache.undown1 else Config.Apache.undown
fun reload () = if imVersion1 () then Config.Apache.reload1 else Config.Apache.reload
TextIO.output (file, group))
else
();
+ if isWaklog node then
+ (TextIO.output (file, "\n\tWaklogProtected on\n\tWaklogPrincipal ");
+ TextIO.output (file, user);
+ TextIO.output (file, "/cgi@HCOOP.NET /etc/keytabs/cgi/");
+ TextIO.output (file, user))
+ else
+ ();
(Domain.homedirOf user ^ "/apache/log/"
^ node ^ "/" ^ vhostId, file)
end)
ast.sml
+configTypes.sml
+
../configDefault/config.sig
../configDefault/configDefault.sml