Ruby Gem for generating Apache configurations
Go to file
2010-05-12 18:11:03 -04:00
bin some gem cleanup work 2010-05-06 11:05:24 -04:00
lib check for document_root 2010-05-12 18:10:19 -04:00
skel update rakefile 2010-05-10 16:04:57 -04:00
spec more cool stuff and more docs 2010-05-11 15:19:16 -04:00
test/config more updates, starting code coverage 2010-05-04 11:48:59 -04:00
.gitignore some code cleanup stuff 2010-05-12 14:24:35 -04:00
CHANGELOG version bump 2010-05-12 18:11:03 -04:00
Rakefile more cool stuff and more docs 2010-05-11 15:19:16 -04:00
README.rdoc more cool stuff and more docs 2010-05-11 15:19:16 -04:00

= Apache Config Generator

Programmatically construct your Apache configuration using a powerful DSL built in Ruby.

== Installation

<tt>gem install apache-config-generator</tt>

== Usage

Run <tt>apache-configurator <directory></tt> to create a new directory to hold your config files.
A Rakefile and config.yml file will also be generated.

== Building a config file

Configs center around the Apache::Config.build method:

  Apache::Config.build('sites-available/my-site.conf') do
    server_name 'my-cool-website.cool.wow'
    document_root '/var/www/my-cool-website'

    directory '/' do
      options :follow_sym_links, :indexes
      allow_from_all
    end

    location_match %r{^/secret} do
      deny_from_all

      basic_authentication "My secret", '/etc/apache2/users/global.users', :user => :john
      satisfy :any
    end
  end