0

I've installed apache2 on my virtual server using the community apache2 cookbook. Then I wanted to create virtual host and I followed these steps. In a nutshell I have a small cookbook, with recipe like this:

include_recipe "apache2"

web_app "my-site" do
  server_name "my-site.localhost"
  server_aliases ["www.my-site.localhost"]
  docroot "/vagrant"
end

and a template templates/default/web_app.conf.erb containing virtual host settings. The template contains a lot of @params[:something] variables. I would like to set the variable @params[:directory_options] to Indexes to allow file listing. How can I do that? I tried keys like params or adding something to attributes, but nothing has worked.

Community
  • 1
  • 1
tsusanka
  • 4,801
  • 7
  • 36
  • 42

1 Answers1

2

All you have to do is use the parameter's name. The same way you set up docroot you can set the other varibles:

web_app 'vagrant' do
  server_name 'v.l'
  server_aliases ['www.v.l']
  docroot '/var/www/'
  directory_options 'FollowSymLinks Indexes'
end
tsusanka
  • 4,801
  • 7
  • 36
  • 42