Created
          December 7, 2011 04:55 
        
      - 
      
 - 
        
Save dakatsuka/1441521 to your computer and use it in GitHub Desktop.  
    recipe of nginx with passenger
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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