Ruby Gem for generating Apache configurations
Go to file
2010-05-10 17:43:34 -04:00
bin some gem cleanup work 2010-05-06 11:05:24 -04:00
lib working on more directives 2010-05-10 17:43:34 -04:00
skel update rakefile 2010-05-10 16:04:57 -04:00
spec spec fixes 2010-05-10 11:27:56 -04:00
test/config more updates, starting code coverage 2010-05-04 11:48:59 -04:00
.gitignore echoe updates 2010-05-10 16:03:35 -04:00
CHANGELOG fix stupid bug, bumping version number 2010-05-10 16:21:43 -04:00
Rakefile echoe updates 2010-05-10 16:03:35 -04:00
README.md some gem cleanup work 2010-05-06 11:05:24 -04:00

Apache Config Generator

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

Installation

gem install apache-config-generator

Usage

Run apache-configurator <directory> 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