bf9b0bc3 |
1 | {{The most common kinds of domain configuration}} |
2 | |
a54ae325 |
3 | val default_node : (node) = "mire"; |
4cb2e7e7 |
4 | val web_node : (web_node) = "mire"; |
ae175ff1 |
5 | |
6 | val 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 | |
18 | val web = webAt web_node; |
bf9b0bc3 |
19 | |
20 | val dom = |
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 | mailbox <- Mailbox; |
733f6a28 |
32 | defaultAlias mailbox; |
bf9b0bc3 |
33 | |
ae175ff1 |
34 | web "www" with |
fc114810 |
35 | serverAliasDefault; |
36 | www : [Vhost] <- WWW; |
37 | www |
bf9b0bc3 |
38 | end; |
39 | |
40 | config |
41 | end; |
695b8c37 |
42 | |
43 | val nameserver = \host -> dns (dnsNS host); |
44 | val dnsIP = \from -> \to -> dns (dnsA from to); |
45 | val dnsMail = \num -> \host -> dns (dnsMX num host); |
46 | val dnsAlias = \from -> \to -> dns (dnsCNAME from to); |
d71ae374 |
47 | val dnsDefault = \to -> dns (dnsDefaultA to); |