]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dev/recipes/default.rb
Update apache config for 2.4
[chef.git] / cookbooks / dev / recipes / default.rb
index ef8e2dc77939d6826ed8259c447d3111f37a9aa2..fa2c8081b6472b770931f2abc5e6895098da45d1 100644 (file)
@@ -53,7 +53,8 @@ easy_install_package "geojson"
 
 apache_module "env"
 apache_module "expires"
 
 apache_module "env"
 apache_module "expires"
-apache_module "fastcgi-handler"
+apache_module "proxy"
+apache_module "proxy_fcgi"
 apache_module "rewrite"
 apache_module "wsgi"
 
 apache_module "rewrite"
 apache_module "wsgi"
 
@@ -64,6 +65,7 @@ gem_package "rails" do
 end
 
 service "php5-fpm" do
 end
 
 service "php5-fpm" do
+  provider Chef::Provider::Service::Upstart
   action [ :enable, :start ]
   supports :status => true, :restart => true, :reload => true
 end
   action [ :enable, :start ]
   supports :status => true, :restart => true, :reload => true
 end
@@ -90,7 +92,7 @@ template "/etc/phppgadmin/config.inc.php" do
   mode 0644
 end
 
   mode 0644
 end
 
-link "/etc/apache2/conf.d/phppgadmin" do
+file "/etc/apache2/conf.d/phppgadmin" do
   action :delete
 end
 
   action :delete
 end
 
@@ -101,6 +103,7 @@ end
 search(:accounts, "*:*").each do |account|
   name = account["id"]
   details = node[:accounts][:users][name] || {}
 search(:accounts, "*:*").each do |account|
   name = account["id"]
   details = node[:accounts][:users][name] || {}
+  port = 7000 + account["uid"].to_i
 
   if ["user","administrator"].include?(details[:status])
     user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}"
 
   if ["user","administrator"].include?(details[:status])
     user_home = details[:home] || account["home"] || "#{node[:accounts][:home]}/#{name.to_s}"
@@ -111,14 +114,14 @@ search(:accounts, "*:*").each do |account|
         owner "root"
         group "root"
         mode 0644
         owner "root"
         group "root"
         mode 0644
-        variables :user => name
+        variables :user => name, :port => port
         notifies :reload, "service[php5-fpm]"
       end
 
       apache_site "#{name}.dev.openstreetmap.org" do
         template "apache.user.erb"
         directory "#{user_home}/public_html"
         notifies :reload, "service[php5-fpm]"
       end
 
       apache_site "#{name}.dev.openstreetmap.org" do
         template "apache.user.erb"
         directory "#{user_home}/public_html"
-        variables :user => name
+        variables :user => name, :port => port
       end
     end
   end
       end
     end
   end