Skip to content

Arsey/apache_vhosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Hosts Cookbook for Chef and Vagrant

This cookbook makes configuring Apache virtual hosts. Especially useful for Vagrant.

Usage (part of Vagrant file)

config.vm.provision :chef_solo do |chef|
  chef.cookbooks_path = ["cookbooks"]
  chef.add_recipe 'apache2'
  chef.add_recipe 'apache_vhosts'
  :apache_vhosts=>[
	{
		:app=>"app1",
		:path=>"/var/www/app1",
		:server_name=>"app1.local",
		:server_email=>"[email protected]"
		:server_alias=>"www.app1.local"
	},
	{
		:app=>"app2",
		:path=>"/var/www/app2",
		:server_name=>"app2.local",
		:server_email=>"[email protected]"
	}
	]
end

Usage (Using Chef Server via attribute file)

set['apache_vhosts'] = 
	[
		{
		  "app" => "app1",
		  "path" => "/var/www/app1",
		  "server_name" => "app1.local",
		  "server_alias" => "[email protected]",
		  "server_email" => "www.app1.local"	
		},
		{
		  "app" => "app2",
		  "path" => "/var/www/app2",
		  "server_name" => "app2.local",
		  "server_alias" => "[email protected]",
		  "server_email" => "www.app2.local"	
		}
	]	

Also you can use this cookbook with librarian-chef on install. Just add

site 'http://community.opscode.com/api/v1'
...
cookbook "apache_vhosts"
...

to the Cheffile

About

Virtual Hosts Cookbook for Chef with Vagrant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published