A couple of things:
Since the writing fo this question, Opscode has split out their repository structure to be one-repo-per-cookbook to make the project a lot clearer.
The up-to-date released, stable nginx cookbook can be found here: http://community.opscode.com/cookbooks/nginx
As to serve web pages from an alternate container:
The convention to do something like this would be to write a simpler cookbook, that leverages the nginx cookbook but provides you with a way to "do what you want".
Since the default nginx installation drops a config file and sets the source dir, a way I would do this in a "wrapper" cookbook is:
- Create my cookbook
- Declare
depends 'nginx' in metadata.rb
In my cookbook's attributes/default.rb, set the following attribute to false:
default['nginx']['default_site_enabled'] = false
In my recipes/default.rb, have:
include_recipe 'nginx'
cookbook_file '/etc/nginx/sites-available/mycustomwebapp'
nginx_site 'mycustomwebapp' do
action :enable
end
Create an nginx conf file that looks like this in files/default/mycustomwebapp:
server {
root /vagrant/public;
index index.html index.htm;
blah blah...
}
Then you should be good to go!