Fix some Apache types
[hcoop/domtool2.git] / lib / apache.dtl
index 93fb3a3..9ad396a 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}}
 
@@ -21,7 +31,7 @@ extern val no_ssl : ssl;
 extern val use_cert : ssl_cert_path -> ssl;
 
 extern val vhost : host -> Vhost => [Domain]
-       {WebNodes : [web_node],
+       {WebPlaces : [web_place],
         SSL : ssl,
         User : your_user,
         Group : your_group,
@@ -39,10 +49,16 @@ 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.}}
 
-extern val serverAlias : your_domain_host -> [Vhost];
+extern val serverAliasHost : your_domain_host -> [Vhost & !Location];
 {{Give an alternate hostname for this vhost.}}
+extern val serverAlias : host -> [Vhost & !Location];
+{{Like serverAliasHost, but adds an alias for the given hostname at every domain
+  being configured.}}
+extern val serverAliasDefault : [Vhost & !Location];
+{{Like serverAliasDefault, but adds aliases for the domains being configured
+  instead of any of their hosts/"subdomains".}}