I installed my first stray car, with cookbooks loaded through a knife.
I am stuck in setting up a virtual host.
Here is my Vagrantfile:
Vagrant.configure("2") do |config| config.vm.box = "precise32" config.vm.box_url = "http://files.vagrantup.com/precise32.box" config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.network :private_network, ip: "192.168.33.10" config.vm.provision :chef_solo do |chef| chef.json = { "mysql" => { "server_root_password" => "admin", "server_repl_password" => "admin", "server_debian_password" => "admin" }, "apache" => { "listen_address" => "0.0.0.0" } } chef.add_recipe "apt" chef.add_recipe "vim" chef.add_recipe "openssl" chef.add_recipe "apache2" chef.add_recipe "mysql" chef.add_recipe "mysql::server" chef.add_recipe "php" # chef.add_recipe "php::module_apc" chef.add_recipe "php::module_curl" chef.add_recipe "php::module_mysql" chef.add_recipe "apache2::mod_php5" chef.add_recipe "apache2::mod_rewrite" end web_app "blog_site" do server_name "blog" server_aliases [ "blog.#{node['domain']}", node['fqdn'] ] docroot "/var/www/blog_site" end # end
I saw here that if I want to set up a virtual host through apache cooking, I have to use the definition of "web_app".
I added web_app to the stray file, but I get this error
in `block in <top (required)>': undefined method `web_app' for main:Object (NoMethodError)
which means (I think) that the syntax is incorrect :)
How can i fix this? Where does the definition of "web_app" go?
source share