Renders and enables vhost files for nginx.
This was written because at the time there was no other simple way to render out a vhost file for nginx that proxies to unicorn locally over a unix socket
Lets you configure multiple vhost files from data bags.
Does nothing
nginx
Isn't required, but I'm not sure why else you would need nginx config files.
Ubuntu 10.04, 12.04 Centos 5.8, 6.3
Should work everywhere
node.nginx.vhosts = [] node.nginx.vhost.data_bag_name = "nginx"
nginx_vhost "unicorn.example.com" do
sockets [ "unix:/path/to/unicorn.sock" ]
end
nginx_vhost "ssl.example.com" do
port 443
ssl_key "/path/to/cert.key"
ssl_cert "/path/to/cert.pem"
upstream false
end
nginx_vhost "example.com" do
servers [ "10.0.0.1:80", "10.0.0.2:80", "10.0.0.3:80" ]
end