DomTool/Examples772022-02-10 16:18:482603:7080:493d:db56:2d52:b733:fa7c:b161added example of using external mailserver762019-04-27 23:48:35ClintonEbadi752019-04-27 23:46:36ClintonEbadibasic example of new proxyRewrite directive742019-01-08 03:28:03ClintonEbadimod_rewrite traces are logged to regular error.log now732018-10-22 19:43:32ClintonEbadiForceSSL is TRUE by default, update example722018-10-20 18:43:03ClintonEbadibasic docs for webSsl directive... examples still need a really thorough review and update712018-10-20 18:35:25ClintonEbadiplacing anything not meant to be served from hcoop.net/~YOU in ~/public_html considered dangerous702015-09-18 04:09:51ClintonEbadispurious `with' in wordpress `WWW' example692015-04-13 19:15:37ClintonEbadicatch-alls have not been enabled by default for a looooong time682014-12-21 06:44:11DavidKerschnerRemoved section about dynamic dns. The security hole this relied upon has been patched.672014-04-14 07:23:31ClintonEbadiupdate moinMoin and wordPress syntax662013-01-14 07:23:06ClintonEbadiinstalling wordpress from svn seems like a good thing to mention652013-01-14 07:03:01ClintonEbadicat642013-01-04 21:31:30ClintonEbadiaddDefaultSPF632012-04-17 09:12:5252.41.138.58.dy.bbexcite.jpbetter find622010-01-01 20:17:26MichaelShynar612010-01-01 20:10:58AdamChlipalaAvoid duplicating an env var setting602010-01-01 19:58:28MichaelShynar592009-12-08 23:53:0893-173-241-32.bb.netvision.net.il582009-12-08 23:50:1893-173-241-32.bb.netvision.net.il572009-12-07 17:56:30jasper.cs.tamu.eduAdded an example of how to get wordpress working on the default domain, without need for a subdomain or extra path element in the URL.562009-06-09 05:14:26RobinTempletonnew dynamic dns script552009-04-10 09:35:26MichalCharemza542009-04-10 09:34:04MichalCharemzaAdded section on redirecting from www.mydomain to mydomain532009-04-09 16:35:55AdamChlipalavhostDefault example522008-09-28 13:53:39AdamChlipalaSSI512008-08-14 12:50:22AdamChlipalacatchAllAlias is gone.502008-07-07 04:28:05localhostconverted to 1.6 markup492008-05-19 21:06:07DavorOcelic482008-04-09 00:23:38MichaelOlsonMake WhyNotHtaccess a subpage472008-04-08 00:14:51AdamChlipalaWhyNoHtaccess462008-04-07 23:54:31AdamChlipalaSimple web site examples452008-04-05 20:29:18AdamChlipalaWhoops; wrong directive442008-04-05 20:26:31AdamChlipaladnsDefaultIP432008-04-03 18:44:47AdamChlipalaEnglish 911422008-04-01 19:48:56bzq-84-108-20-56.cablep.bezeqint.net412008-04-01 19:39:40bzq-84-108-20-56.cablep.bezeqint.net402008-02-25 18:55:30BjörnLindström392008-02-24 16:20:04AdamChlipalaExplain wordpress382008-02-02 21:13:21AdamChlipalaShow skip flag372008-02-02 16:37:03AdamChlipalaMore mod_rewrite examples362007-12-29 02:36:13AdamChlipalaDrastic refactor to remove all possibilities for someone to look at a single example and draw a bad conclusion352007-12-16 22:19:40AdamChlipalacgiExtension342007-12-16 15:04:29AdamChlipalafollowSymLinks332007-12-16 15:03:02AdamChlipalaIPv6322007-12-16 14:39:25BjörnLindströmReplaced domNoWWW with CreateWWW = false312007-12-16 06:50:32nl105-254-74.student.uu.sedomNoDefaultAlias deprecated302007-12-16 06:04:22DanielVerkampfix syntax error in access control example292007-12-11 03:18:4959.94.210.15282007-11-23 20:41:19RyanMikulovskymention domNoDefaultAlias272007-11-22 20:08:45AdamChlipalaRemoved 'handleMail' from Mailman example, because 'dom' already includes that.262007-11-19 03:12:21MichaelOlsonadd handleMail to mailman example252007-11-19 03:07:52MichaelOlsonUse "mailman". explain what it does242007-11-19 01:01:34MichaelOlsonAdd ssl usage for simple vhost232007-11-18 23:23:54AdamChlipalaWeb apps222007-11-18 18:15:57AdamChlipalaSSL example212007-11-15 13:05:56AdamChlipalaClarify alias permissions202007-11-12 02:46:44MichaelOlsonAdd link to working examples subpage192007-11-11 18:18:27AdamChlipalaModel T with customized www.yourdomain182007-11-08 20:35:37MichaelOlsonadd dnsDefault line to canonical DNS example172007-10-27 18:27:55AdamChlipala162007-09-16 15:08:36AdamChlipalanoDns example152007-09-14 08:04:34MichaelOlsonMigrate changes142007-07-02 23:48:51MichaelOlsondomtool -> .domtool132007-07-02 23:33:02MichaelOlsonUpdate DNS example to use the new nameservers122007-06-23 20:44:29212.15.179.73112007-06-23 18:54:35212.15.179.73102007-05-25 22:02:24AdamChlipalaKill stray =92007-05-25 22:00:17AdamChlipalaLowercase rewrite*82007-04-29 21:55:37AdamChlipalaSome changes regarding domain aliases72007-04-27 00:21:43AdamChlipalaType of SSL env. var. changed62006-12-17 22:39:34AdamChlipalaMailman52006-12-17 22:37:17AdamChlipalaDone with Apache examples42006-12-17 22:22:14AdamChlipalaMore Apache examples32006-12-17 21:55:46AdamChlipalaBasic Apache22006-12-17 21:40:47AdamChlipalaMail12006-12-17 21:31:54AdamChlipalaHere are some example configuration files for DomTool, our distributed configuration management system. DomainsThe Model TIf you just want to declare your domain with a www.yourdomain
virtual host serving out of ~/public_html/
and your-hcoop-username@yourdomain
mail forwarded to your mailbox, use: Or, if you don't want any mail to be forwarded to your mailbox, use: Upgraded Model TIf 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
: Model T with customized www.yourdomainYou 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: Model T with redirect from www.yourdomain to yourdomainTo redirect all URLs from to you need to disable the automatic creation of the www host, and then create it manually specifying a permanent redirect rule. Attack of the Model T ClonesWe can take the Model T and use it with some alternate names for the domain we're configuring. 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. Subdomain RedirectionThis example aliases a subdomain and redirects it to the "www" virtual host. This means that when accessing yourSubdomain.yourdomain.com you will actually be receiving content defined by www.yourdomain.com. The Do-It-YourselfThe 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. You shouldn't use the domain
directive unless you really know what you're doing when it comes to Internet protocols, and you have a good reason not to like the defaults that dom
includes. DNSHere's a tour through the available DNS features. You probably don't want to use any nameserver
, dnsDefault
, or dnsMail
directives in your configuration, since dom
will include the proper defaults for you. It's worth reminding that you probably shouldn't use the domain
directive. We only use it here for illustrative purposes. Keeping DNS elsewhereThis example shows how to configure mail handling for a domain that is primarily hosted off of HCoop. We only use domain
instead of dom
because dom
already includes the handleMail
directive that we want to demonstrate. MailWe only use domain
instead of dom
because dom
already includes the handleMail
directive that we want to demonstrate. External MailserverUsing an external mailserver is possible by adding manual DNS records. Apache.htaccess
files are not processed on our servers for security reasons, as explained on DomTool/WhyNoHtaccess. See the examples below to learn how to use Apache features that are often controlled with .htaccess
files. The DefaultThe standard dom
directive gives you a web site at www.yourdomain
and yourdomain
, pulling content from your ~/public_html
directory. Extending the DefaultYou can tweak the configuration for your domain's www
virtual host like this: Simple Additional Web SitesIt's easy to add extra web sites to your domain when they just serve static content from subdirectories of your home directory: The Model TNow we come to the web
directive, which should be your main tool for creating additional virtual vhosts with custom configuration. Note that the web
directive also adds the right DNS mapping for your virtual host. Never use web "www"
within a dom
directive. Instead, see the examples at the beginning of the Apache section. All of the directives demonstrated in the rest of the Apache section can be used between the begin
and end
demonstrated in that example. The Do-It-YourselfThis one doesn't add any DNS mappings. You probably never want to use vhost
instead of web
. The Top-Level Do-It-YourselfThe same can also be done to create a vhost accessible via http://yourdomain/
. Using a nonstandard web serverUsing SSL (HTTPS)For this example, we assume that you've applied for and been granted permissions on the SSL certificate /etc/apache2/ssl/user/yourdomain.pem
. Allowing non-secure & secure connection with same behaviourIf you want to enable ssl and force a redirect from http to https, the webSsl
directive can handle this for you in most cases. The example below is stripped of all extra settings on the "www" web directive. If you have any special settings, they should be copied as well. If you want to allow both http and https with the same configuration instead, you can set the ForceSSL
environment variable to false. Bucking all the trendshome "private_html"
builds the full path to subdirectory private_html
of your home directory. Location-specific configurationServer aliasesNote that you must have Domtool configuration rights to all domains you name with serverAlias
. See the example "Attack of the Model T Clones" for a more convenient way of duplicating all of a domain's configuration for one or more other domains. Fancy directory index generationMailmanThe following example will: Permit delivery of email of the form LIST@yourdomain to Mailman, provided that LIST is a valid Mailman list that you own. Set up a web interface at http://lists.yourdomain/listinfo
, which contains a general overview of the lists that you own and permits you to administer them. Add a valid DNS mapping for lists.yourdomain. Common Web ApplicationsMoinMoinAdding a Wiki to a Bigger SiteWordPressWhen installing Wordpress, you most likely want to install using subversion. The web based updater is inherently insecure, and your life will be much easier if you use subversion to track changes in Wordpress. A Standalone BlogMake sure you have the WordPress distribution installed at the appropriate DocumentRoot
. If the Blog is Your Entire SiteAgain, make sure you have the WordPress distribution installed at the appropriate DocumentRoot
. Adding a Blog to a Bigger SiteMake sure you have the WordPress distribution installed at the filesystem location implied by the URL prefix you choose. Your blog will be accessible at http://mysite.yourdomain/url/prefix/...
. Live Examples in HCoop AFSThis is a listing of some of the files in the HCoop AFS area which contain in-production examples of DomTool configuration. /afs/hcoop.net/user/d/do/docelic/.domtool/spinlocksolutions.com To find other files and possibly grep for particular examples in them, you can use the following shell commands: /dev/null | xargs -I {} wc -l {} | sort -n
]]>Putting It All TogetherIn order to help you put all of the pieces together, some full working examples are available in separate subpage. CategoryMemberManual