Fix user domtool directory resolution
[hcoop/domtool2.git] / lib / easy_domain.dtl
index 9a1ace5..3c3d4e0 100644 (file)
@@ -1,6 +1,20 @@
 {{The most common kinds of domain configuration}}
 
-val web_ip : (ip) = "1.2.3.4";
+val web_node : (web_node) = "mire";
+
+val webAt =
+       \ n : (web_node) ->
+       \ host : (host) ->
+       \\ config : Vhost ->
+               (dns (dnsA host (ip_of_node (web_node_to_node n)));
+
+               vhost host where
+                       WebNodes = [n]
+               with
+                       config
+               end);
+
+val web = webAt web_node;
 
 val dom =
        \ d : (your_domain) ->
@@ -9,13 +23,11 @@ val dom =
                        dns (dnsNS "ns.hcoop.net");
                        dns (dnsNS "ns2.hcoop.net");
 
-                       dns (dnsA "www" web_ip);
-
                        handleMail;
                        mailbox <- Mailbox;
                        catchAllAlias mailbox;
 
-                       vhost "www" with
+                       web "www" with
                        end;
 
                        config