domtool-mode standard library table changes performed automatically by Makefile
[hcoop/zz_old/domtool2-proto.git] / lib / easy_domain.dtl
CommitLineData
bf9b0bc3 1{{The most common kinds of domain configuration}}
2
a54ae325 3val default_node : (node) = "mire";
4cb2e7e7 4val web_node : (web_node) = "mire";
ae175ff1 5
6val webAt =
4cb2e7e7 7 \ n : (web_node) ->
ae175ff1 8 \ host : (host) ->
9 \\ config : Vhost ->
4cb2e7e7 10 (dns (dnsA host (ip_of_node (web_node_to_node n)));
ae175ff1 11
12 vhost host where
13 WebNodes = [n]
14 with
15 config
16 end);
17
18val web = webAt web_node;
bf9b0bc3 19
9b3f6729 20val domNoDefaultAlias =
bf9b0bc3 21 \ d : (your_domain) ->
22 \\ config : Domain ->
23 domain d with
e28c342c 24 dns (dnsNS "ns1.hcoop.net");
25 dns (dnsNS "ns3.hcoop.net");
bf9b0bc3 26
733f6a28 27 dns (dnsDefaultA (ip_of_node (web_node_to_node web_node)));
a54ae325 28
bf9b0bc3 29 handleMail;
c842ace6 30 dns (dnsMX 1 "deleuze.hcoop.net");
bf9b0bc3 31
ae175ff1 32 web "www" with
fc114810 33 serverAliasDefault;
34 www : [Vhost] <- WWW;
35 www
bf9b0bc3 36 end;
37
38 config
39 end;
695b8c37 40
9b3f6729 41val dom =
42 \ d : (your_domain) ->
43 \\ config : Domain ->
44 domNoDefaultAlias d with
45 config;
46 mailbox <- Mailbox;
47 defaultAlias mailbox;
48 end;
49
695b8c37 50val nameserver = \host -> dns (dnsNS host);
51val dnsIP = \from -> \to -> dns (dnsA from to);
52val dnsMail = \num -> \host -> dns (dnsMX num host);
53val dnsAlias = \from -> \to -> dns (dnsCNAME from to);
d71ae374 54val dnsDefault = \to -> dns (dnsDefaultA to);