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