domtool-mode standard library table changes performed automatically by Makefile
[hcoop/domtool2.git] / lib / easy_domain.dtl
CommitLineData
6bb366c5
AC
1{{The most common kinds of domain configuration}}
2
6eeb3bf9 3val default_node : (node) = "mire";
60695e99 4val web_node : (web_node) = "mire";
15e529d6
AC
5
6val webAt =
60695e99 7 \ n : (web_node) ->
15e529d6
AC
8 \ host : (host) ->
9 \\ config : Vhost ->
60695e99 10 (dns (dnsA host (ip_of_node (web_node_to_node n)));
15e529d6
AC
11
12 vhost host where
13 WebNodes = [n]
14 with
15 config
16 end);
17
18val web = webAt web_node;
6bb366c5 19
6b718954 20val domNoDefaultAlias =
6bb366c5
AC
21 \ d : (your_domain) ->
22 \\ config : Domain ->
23 domain d with
94b7b11a
AC
24 dns (dnsNS "ns1.hcoop.net");
25 dns (dnsNS "ns3.hcoop.net");
6bb366c5 26
16465a9a 27 dns (dnsDefaultA (ip_of_node (web_node_to_node web_node)));
6eeb3bf9 28
6bb366c5 29 handleMail;
1c5aa57d 30 dns (dnsMX 1 "deleuze.hcoop.net");
6bb366c5 31
15e529d6 32 web "www" with
52585297
AC
33 serverAliasDefault;
34 www : [Vhost] <- WWW;
35 www
6bb366c5
AC
36 end;
37
38 config
39 end;
8c142ff5 40
6b718954
AC
41val dom =
42 \ d : (your_domain) ->
43 \\ config : Domain ->
44 domNoDefaultAlias d with
45 config;
46 mailbox <- Mailbox;
47 defaultAlias mailbox;
48 end;
49
8c142ff5
AC
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);
eda33894 54val dnsDefault = \to -> dns (dnsDefaultA to);