Tonto.js: Apache Config File Generator

 _____ ___  _  _ _____ ___
|_   _/ _ \| \| |_   _/ _ \
  | || (_) | .` | | || (_) |
  |_| \___/|_|\_| |_| \___/.JS

Because sometimes, templates either don't cut it, or you get sick of setting up templates. Behold: Tonto.js with support for 591 apache directives, without leaving the comfort of your Javascript couch.

The Tonto (Dilzhę́’é) people are one of the Western Apache groups from North America. Long ago, their enemies called them "foolish", "wild", "crazy", and "those who you don't understand" for speaking and doing things differently than their neighbors. Today they are know throughout art communities for their superior fine crafting.

  1. Server hosts can write a deployment script with Tonto.js to easily customize apache config files for new machines.
  2. Wrap this library with your own to provide an easy interface for generating all of your project's apache configs.
  3. Take your wife out for a nice steak dinner, then to a show that she wants to see. Tell her it was all made possible because you're smart and made time for her with Tonto.js.
var Tonto = require('../'),
    tonto = new Tonto();
tonto.virtualHost('*:443', function (subDirectives) {
    'use strict';
        .header('set Access-Control-Allow-Origin "*"')
        .directory('/var/node/somesite/current/public/', function (directoryDirectives) {
                .addOutputFilterByType('DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript')
                .browserMatch('\\bMSIE\\s6 no-gzip')
                .order('allow, deny')
                .allow('from all');
tonto.virtualHost('*:80', function (subDirectives) {
    'use strict';
        .rewriteCond('%{HTTPS off}')