Expanding TXT support
[hcoop/domtool2.git] / lib / apache.dtl
index db30398..ebfbeb4 100644 (file)
@@ -5,6 +5,16 @@ extern type web_node;
 
 extern val web_node_to_node : web_node -> node;
 
+extern type web_place;
+extern val web_place_default : web_node -> web_place;
+extern val web_place : web_node -> your_ip -> web_place;
+extern val web_place_to_web_node : web_place -> web_node;
+extern val web_place_to_node : web_place -> node;
+extern val web_place_to_ip : web_place -> ip;
+{{Web places are combinations of web nodes (servers on which you are allowed to
+  run web sites) and IP addresses on which those servers should listen for
+  requests.}}
+
 context Vhost;
 {{A WWW virtual host}}
 
@@ -20,26 +30,43 @@ extern type ssl;
 extern val no_ssl : ssl;
 extern val use_cert : ssl_cert_path -> ssl;
 
+extern type php_version;
+extern val php4 : php_version;
+extern val php5 : php_version;
+
 extern val vhost : host -> Vhost => [Domain]
-       {WebNodes : [web_node],
-        SSL : ssl,
-        User : your_user,
-        Group : your_group,
-        DocumentRoot : your_path,
-        ServerAdmin : email,
-        SuExec : suexec_flag};
+  {WebPlaces : [web_place],
+  SSL : ssl,
+  User : your_user,
+  Group : your_group,
+  DocumentRoot : your_path,
+  ServerAdmin : email,
+  SuExec : suexec_flag,
+  PhpVersion : php_version};
 {{Add a new named Apache virtual host, specifying which nodes' Apache servers
   should answer requests for this host, whether it should use SSL, what UNIX
   user and group dynamic content generators should be run as, the filesystem
   path to the static content root, and the e-mail address to which error pages
   should direct visitors.}}
 
+extern val vhostDefault : Vhost => [Domain]
+  {WebPlaces : [web_place],
+  SSL : ssl,
+  User : your_user,
+  Group : your_group,
+  DocumentRoot : your_path,
+  ServerAdmin : email,
+  SuExec : suexec_flag,
+  PhpVersion : php_version};
+{{Like <tt>vhost</tt>, but for, e.g., <tt>yourdomain.com</tt> instead of
+  <tt>www.yourdomain.com</tt>}}
+
 context Location;
 
 extern type location;
 {{A valid URI prefix}}
 
-extern val location : location -> Vhost & Location => [Vhost & !Location];
+extern val location : location -> ^Vhost & Location => [Vhost & !Location];
 extern val directory : your_path -> ^Vhost & Location => [Vhost & !Location];
 {{Set some configuration specific to a URI prefix or filesystem directory,
   respectively.}}