DomTool/Examples

Here are some example configuration files for DomTool, our distributed configuration management system.

TableOfContents()

1. Domains

1.1. The Model T

If you just want to declare your domain with a www.yourdomain virtual host serving out of ~/public_html/ and all mail forwarded to your mailbox, use: {{{dom "yourdomain" with end;}}}

1.2. Upgraded Model T

If you like everything dom gives you but want to add additional configuration, include it between with..end. For instance, to add an extra web virtual host other: {{{dom "yourdomain" with

end;}}}

1.3. Model T with customized www.yourdomain

You wouldn't want to copy the last example with "www" instead of "other", because dom already creates a www vhost. Instead, there's a more convenient way to configure this most common of vhosts: {{{dom "yourdomain" where

with

end;}}}

1.4. Attack of the Model T Clones

We can take the Model T and use it with some alternate names for the domain we're configuring. {{{dom "yourdomain" where

with end;}}} A single Apache virtual host is created, answering to multiple names. Other configuration is duplicated like you had entered it in a separate dom block for each alias.

1.5. The Do-It-Yourself

The lowest-level way of configuring a domain is the domain directive, which does nothing but set up basic DNS parameters and provide a space for including further directives: {{{domain "yourdomain" with

end;}}}

2. DNS

Here's a tour through the available DNS features.

{{{domain "yourdomain" with

end;}}}

2.1. Keeping DNS elsewhere

This example shows how to configure mail handling for a domain that is primarily hosted off of HCoop:

{{{domain "yourdomain" where

with

end;}}}

3. Mail

{{{domain "yourdomain" with

end;}}}

4. Apache

4.1. The Model T

{{{domain "yourdomain" with

end;}}}

Note that the web directive also adds the right DNS mapping for your virtual host.

4.2. The Do-It-Yourself

{{{domain "yourdomain" with

end;}}}

This one doesn't add any DNS mappings.

4.3. Using a nonstandard web server

{{{domain "yourdomain" with

end;}}}

4.4. Using SSL

For this example, we assume that you've applied for and been granted permissions on the SSL certificate /etc/openssl/you.pem and the IP address 1.2.3.4 on mire.

{{{domNoWww "yourdomain" with

end;}}}

{{{domain "yourdomain" with

end;}}}

home "private_html" builds the full path to subdirectory private_html of your home directory.

4.6. Basic URL handling

{{{domain "yourdomain" with

end;}}}

4.7. Location-specific configuration

{{{domain "yourdomain" with

end;}}}

4.8. Server aliases

{{{domain "yourdomain" with

end;}}}

Note that you must have domtool configuration rights to all domains you name with serverAlias.

4.9. Directory options

{{{domain "yourdomain" with

end;}}}

4.10. Access control

{{{domain "yourdomain" with

end}}}

4.11. Fancy directory index generation

{{{domain "yourdomain" with

end;}}}

4.12. mod_rewrite

{{{domain "yourdomain" with

end;}}}

4.13. mod_proxy

{{{domain "yourdomain" with

end;}}}

5. Mailman

{{{domain "yourdomain" with

end;}}}

6. Live Examples in HCoop AFS

This is a listing of files in the HCoop AFS area which contain in-production examples of DomTool configuration.

7. Putting It All Together

In order to help you put all of the pieces together, some full working examples are available in [:/Full:separate subpage].

DomTool/Examples (last edited 2007-11-18 18:15:57 by AdamChlipala)