| 1 | structure Apache :> APACHE_CONFIG = struct |
| 2 | |
| 3 | open ConfigTypes |
| 4 | |
| 5 | val reload = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache" |
| 6 | val down = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-down" |
| 7 | val undown = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-undown" |
| 8 | val fixperms = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache-fixperms" |
| 9 | |
| 10 | val reload1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3" |
| 11 | val down1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-down" |
| 12 | val undown1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-undown" |
| 13 | val fixperms1 = ConfigCore.sudo ^ " " ^ ConfigCore.installPrefix ^ "/sbin/domtool-publish apache1.3-fixperms" |
| 14 | |
| 15 | val confDir = ConfigCore.localRoot ^ "/vhosts" |
| 16 | |
| 17 | val webNodes_all = [("shelob", {version = APACHE_2, auth = MOD_WAKLOG})] |
| 18 | val webNodes_admin = [("minsky", {version = APACHE_2, auth = MOD_WAKLOG}), |
| 19 | ("busted", {version = APACHE_2, auth = MOD_WAKLOG})] |
| 20 | |
| 21 | val proxyTargets = ["http://hcoop.net/cgi-bin/mailman", |
| 22 | "http://hcoop.net/pipermail"] |
| 23 | |
| 24 | val proxyHosts = ["marsh"] |
| 25 | |
| 26 | val public_html = "public_html" |
| 27 | |
| 28 | fun logDirOf version1 user = |
| 29 | if size user < 2 then |
| 30 | "/bad_username" |
| 31 | else |
| 32 | String.concat [if version1 then |
| 33 | "/var/log/apache/user/" |
| 34 | else |
| 35 | "/var/log/apache2/user/", |
| 36 | String.substring (user, 0, 1), |
| 37 | "/", |
| 38 | String.substring (user, 0, 2), |
| 39 | "/", |
| 40 | user, |
| 41 | "/apache/log"] |
| 42 | |
| 43 | (* FIXME: hcoop.net reference *) |
| 44 | fun realLogDirOf user = |
| 45 | if size user < 2 then |
| 46 | "/bad_username" |
| 47 | else |
| 48 | String.concat ["/afs/hcoop.net/user/", |
| 49 | String.substring (user, 0, 1), |
| 50 | "/", |
| 51 | String.substring (user, 0, 2), |
| 52 | "/", |
| 53 | user, |
| 54 | "/.logs/apache"] |
| 55 | |
| 56 | fun backupLogDirOf version1 = |
| 57 | if version1 then |
| 58 | ConfigCore.sharedRoot ^ "/backup/apache/" |
| 59 | else |
| 60 | ConfigCore.sharedRoot ^ "/backup/apache2/" |
| 61 | |
| 62 | fun fastCgiWrapperOf user = |
| 63 | if size user < 2 then |
| 64 | "/bad_username" |
| 65 | else |
| 66 | String.concat [ConfigCore.sharedRoot, |
| 67 | "/httpd/fastcgi/", |
| 68 | String.substring (user, 0, 1), |
| 69 | "/", |
| 70 | String.substring (user, 0, 2), |
| 71 | "/", |
| 72 | user, |
| 73 | "/", |
| 74 | user, |
| 75 | "-wrapper-wrapper"] |
| 76 | |
| 77 | (* FIXME: hcoop reference *) |
| 78 | fun phpFastCgiWrapper version = "/afs/hcoop.net/common/bin/php" ^ Int.toString version ^ "-fcgi-wrapper" |
| 79 | |
| 80 | val waklogUserFile = ConfigCore.localRoot ^ "/waklog.conf" |
| 81 | |
| 82 | end |