c88f92c933bddbf65f164967697d71b2317f676f
[hcoop/domtool2.git] / configDefault / apache.cfg
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 = [("navajos", {version = APACHE_2, auth = MOD_WAKLOG})]
18 val webNodes_admin = [("deleuze", {version = APACHE_2, auth = MOD_WAKLOG}),
19 ("mccarthy", {version = APACHE_2, auth = NO_AUTH})]
20
21 val proxyTargets = ["http://hcoop.net/cgi-bin/mailman",
22 "http://hcoop.net/pipermail"]
23
24 val proxyHosts = ["bog"]
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 val defaultPhpVersion = 5
63
64 val waklogUserFile = ConfigCore.localRoot ^ "/waklog.conf"
65
66 end