include_recipe "apache"
include_recipe "git"
include_recipe "mysql"
-include_recipe "php::apache"
+include_recipe "php::fpm"
cache_dir = Chef::Config[:file_cache_path]
notifies :reload, "service[apache2]"
end
+php_fpm "forum.openstreetmap.org" do
+ php_admin_values "open_basedir" => "/srv/forum.openstreetmap.org/html/:/usr/share/php/:/tmp/",
+ "disable_functions" => "exec,shell_exec,system,passthru,popen,proc_open"
+ prometheus_port 9253
+end
+
apache_site "forum.openstreetmap.org" do
template "apache.erb"
end
DocumentRoot /srv/forum.openstreetmap.org/html
- ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/srv/forum.openstreetmap.org/html/:/usr/share/php/:/tmp/\ndisable_functions=exec,shell_exec,system,passthru,popen,proc_open"
- ProxyFCGISetEnvIf "true" PHP_VALUE "upload_max_filesize=70M\npost_max_size=100M"
+ <FilesMatch ".+\.ph(ar|p|tml)$">
+ SetHandler "proxy:unix:/run/php/forum.openstreetmap.org.sock|fcgi://127.0.0.1"
+ </FilesMatch>
</VirtualHost>
<Directory /srv/forum.openstreetmap.org/html>