X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/6bb366c5a60247419dce5cbce4a5c034fa2f1e5c..3c855c4bab81d7d4adb54724f0e08be61a55241e:/lib/easy_domain.dtl diff --git a/lib/easy_domain.dtl b/lib/easy_domain.dtl index 9a1ace5..3c3d4e0 100644 --- a/lib/easy_domain.dtl +++ b/lib/easy_domain.dtl @@ -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