Ruby Gem for generating Apache configurations
Go to file
2010-05-06 22:26:12 -04:00
bin some gem cleanup work 2010-05-06 11:05:24 -04:00
lib rewrite work and log file cleanup 2010-05-06 22:26:12 -04:00
skel some gem cleanup work 2010-05-06 11:05:24 -04:00
spec more cleanups 2010-05-06 10:40:45 -04:00
test/config more updates, starting code coverage 2010-05-04 11:48:59 -04:00
.gitignore more updates, starting code coverage 2010-05-04 11:48:59 -04:00
Rakefile more testing setup 2010-05-04 17:04:44 -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