Wednesday, February 5, 2014

chef-solo apache2 add files

1, following this tutorial to setup apache2
http://gettingstartedwithchef.com/first-steps-with-chef.html

When you finish first step, you will receive 403 forbidden page because there is no index file under apache.

2, add index.html to apache2
A: add index.html into this folder:
 [root@new-host-3 chef-repo]# ll cookbooks/apache2/files/default/
index.html

B:  vim  chef-repo/cookbooks/apache2/recipes/default.rb
add:
cookbook_file "/var/www/html/index.html" do
  source "index.html"
  mode "0644"
end

3: run again:
chef-solo -c solo.rb -j web.json


1 comment:

  1. Thanks for sharing this Information !!

    Check out More Linux Related.
    (Installation/Configururation/Trouble Shooting etc) at :
    Linux Trouble Shooting

    ReplyDelete