DefaultA parameter to dom
[hcoop/domtool2.git] / lib / apache.dtl
1 {{Apache web server configuration}}
2
3 extern type web_node;
4 {{Nodes that accept Apache configuration from you}}
5
6 extern val web_node_to_node : web_node -> node;
7
8 extern type web_place;
9 extern val web_place_default : web_node -> web_place;
10 extern val web_place : web_node -> your_ip -> web_place;
11 extern val web_place_to_web_node : web_place -> web_node;
12 extern val web_place_to_node : web_place -> node;
13 extern val web_place_to_ip : web_place -> ip;
14 {{Web places are combinations of web nodes (servers on which you are allowed to
15 run web sites) and IP addresses on which those servers should listen for
16 requests.}}
17
18 context Vhost;
19 {{A WWW virtual host}}
20
21 extern type suexec_flag;
22 {{Whether or not to use Suexec with a vhost.
23 For users with the 'www' privilege, this type is identical to [bool].
24 For others, it has only one value, [true].}}
25
26 extern type ssl_cert_path;
27 {{Filesystem path to an SSL certificate in your 'cert' list}}
28
29 extern type ssl;
30 extern val no_ssl : ssl;
31 extern val use_cert : ssl_cert_path -> ssl;
32
33 extern type php_version;
34 extern val php4 : php_version;
35 extern val php5 : php_version;
36
37 extern val vhost : host -> Vhost => [Domain]
38 {WebPlaces : [web_place],
39 SSL : ssl,
40 User : your_user,
41 Group : your_group,
42 DocumentRoot : your_path,
43 ServerAdmin : email,
44 SuExec : suexec_flag,
45 PhpVersion : php_version};
46 {{Add a new named Apache virtual host, specifying which nodes' Apache servers
47 should answer requests for this host, whether it should use SSL, what UNIX
48 user and group dynamic content generators should be run as, the filesystem
49 path to the static content root, and the e-mail address to which error pages
50 should direct visitors.}}
51
52 extern val vhostDefault : Vhost => [Domain]
53 {WebPlaces : [web_place],
54 SSL : ssl,
55 User : your_user,
56 Group : your_group,
57 DocumentRoot : your_path,
58 ServerAdmin : email,
59 SuExec : suexec_flag,
60 PhpVersion : php_version};
61 {{Like <tt>vhost</tt>, but for, e.g., <tt>yourdomain.com</tt> instead of
62 <tt>www.yourdomain.com</tt>}}
63
64 context Location;
65
66 extern type location;
67 {{A valid URI prefix}}
68
69 extern val location : location -> ^Vhost & Location => [Vhost & !Location];
70 extern val directory : your_path -> ^Vhost & Location => [Vhost & !Location];
71 {{Set some configuration specific to a URI prefix or filesystem directory,
72 respectively.}}
73
74 extern type regexp;
75 {{PCRE regular expression}}
76
77 extern val filesMatch : regexp -> ^Vhost & Location => [Vhost & !Location];
78 {{Mark nested configuration to only apply to filenames matching the regexp.}}
79
80 extern val serverAliasHost : your_domain_host -> [Vhost];
81 {{Give an alternate hostname for this vhost.}}
82 extern val serverAlias : host -> [Vhost];
83 {{Like serverAliasHost, but adds an alias for the given hostname at every domain
84 being configured.}}
85 extern val serverAliasDefault : [Vhost];
86 {{Like serverAliasDefault, but adds aliases for the domains being configured
87 instead of any of their hosts/"subdomains".}}
88
89 extern val testNoHtaccess : [Location];