Skip to content

Instantly share code, notes, and snippets.

@dakatsuka
Created December 7, 2011 04:55
Show Gist options
  • Save dakatsuka/1441521 to your computer and use it in GitHub Desktop.
Save dakatsuka/1441521 to your computer and use it in GitHub Desktop.
recipe of nginx with passenger
package "libcurl4-openssl-dev"
gem_package "passenger" do
gem_binary "#{node['ruby']['current']}/bin/gem"
options "--no-ri --no-rdoc"
end
script "install nginx with passenger" do
interpreter "bash"
user "root"
not_if "test -d /opt/nginx"
code <<-EOC
#{node['ruby']['current']}/bin/passenger-install-nginx-module --auto --auto-download --prefix=/opt/nginx
EOC
end
template "/etc/init/nginx.conf" do
source "/etc/init/nginx.conf.erb"
mode "0644"
owner "root"
group "root"
end
service "nginx" do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment