X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/8e965b2da49aab1faef95b25471513498ceca895..47b18d2866e2d2a6533f23ab64c5c72a747065ff:/configDefault/apache.cfg diff --git a/configDefault/apache.cfg b/configDefault/apache.cfg dissimilarity index 72% index e1e7883..7a7db7d 100644 --- a/configDefault/apache.cfg +++ b/configDefault/apache.cfg @@ -1,19 +1,82 @@ -structure Apache :> APACHE_CONFIG = struct - -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"] -val webNodes_admin = ["deleuze"] - -val webNodes_default = ["mire"] - -val proxyTargets = ["http://hcoop.net/cgi-bin/mailman", - "http://hcoop.net/pipermail"] - -val public_html = "home/public_html" - -end +structure Apache :> APACHE_CONFIG = struct + +open ConfigTypes + +val reload = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache" +val down = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-down" +val undown = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-undown" +val fixperms = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-fixperms" + +val reload1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3" +val down1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-down" +val undown1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-undown" +val fixperms1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-fixperms" + +val confDir = ConfigCore.localRoot ^ "/vhosts" + +val webNodes_all = [("shelob", {version = APACHE_2, auth = MOD_WAKLOG})] +val webNodes_admin = [("minsky", {version = APACHE_2, auth = MOD_WAKLOG}), + ("busted", {version = APACHE_2, auth = MOD_WAKLOG})] + +val proxyTargets = ["http://hcoop.net/cgi-bin/mailman", + "http://hcoop.net/pipermail"] + +val proxyHosts = ["marsh"] + +val public_html = "public_html" + +fun logDirOf version1 user = + if size user < 2 then + "/bad_username" + else + String.concat [if version1 then + "/var/log/apache/user/" + else + "/var/log/apache2/user/", + String.substring (user, 0, 1), + "/", + String.substring (user, 0, 2), + "/", + user, + "/apache/log"] + +(* FIXME: hcoop.net reference *) +fun realLogDirOf user = + if size user < 2 then + "/bad_username" + else + String.concat ["/afs/hcoop.net/user/", + String.substring (user, 0, 1), + "/", + String.substring (user, 0, 2), + "/", + user, + "/.logs/apache"] + +fun backupLogDirOf version1 = + if version1 then + ConfigCore.sharedRoot ^ "/backup/apache/" + else + ConfigCore.sharedRoot ^ "/backup/apache2/" + +fun fastCgiWrapperOf user = + if size user < 2 then + "/bad_username" + else + String.concat [ConfigCore.sharedRoot, + "/httpd/fastcgi/", + String.substring (user, 0, 1), + "/", + String.substring (user, 0, 2), + "/", + user, + "/", + user, + "-wrapper-wrapper"] + +(* FIXME: hcoop reference *) +fun phpFastCgiWrapper version = "/afs/hcoop.net/common/bin/php" ^ Int.toString version ^ "-fcgi-wrapper" + +val waklogUserFile = ConfigCore.localRoot ^ "/waklog.conf" + +end