May 2017
Intermediate to advanced
726 pages
15h 38m
English
Assuming you have nginx installed, you want to manage your websites with Chef. You need to create an nginx configuration file for your website and upload your HTML file(s). Let's see how to do this.
Make sure that you have a cookbook named my_cookbook, as described in the Creating and using cookbooks recipe in Chapter 1, Chef Infrastructure.
Berksfile in your Chef repository including my_cookbook:
mma@laptop:~/chef-repo $ subl Berksfile
cookbook 'my_cookbook', path: './cookbooks/my_cookbook'
web_server with the following content:
mma@laptop:~/chef-repo $ subl roles/web_server.rb
name "web_server" run_list "recipe[my_cookbook]" default_attributes "nginx" => { "init_style" ...Read now
Unlock full access