apache_module "env"
apache_module "expires"
-apache_module "fastcgi-handler"
+apache_module "proxy"
+apache_module "proxy_fcgi"
apache_module "rewrite"
apache_module "wsgi"
end
service "php5-fpm" do
+ provider Chef::Provider::Service::Upstart
action [ :enable, :start ]
supports :status => true, :restart => true, :reload => true
end
mode 0644
end
-link "/etc/apache2/conf.d/phppgadmin" do
+file "/etc/apache2/conf.d/phppgadmin" do
action :delete
end
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}"
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"
- variables :user => name
+ variables :user => name, :port => port
end
end
end