#
include_recipe "apache"
-include_recipe "php::apache"
+include_recipe "php::fpm"
directory "/srv/dmca.openstreetmap.org" do
owner "root"
notifies :reload, "service[apache2]"
end
+php_fpm "dmca.openstreetmap.org" do
+ php_admin_values "open_basedir" => "/srv/dmca.openstreetmap.org/html/:/usr/share/php/:/tmp/",
+ "disable_functions" => "exec,shell_exec,system,passthru,popen,proc_open"
+end
+
apache_site "dmca.openstreetmap.org" do
template "apache.erb"
directory "/srv/dmca.openstreetmap.org"
DocumentRoot <%= @directory %>/html
Options -Indexes
-
- ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=<%= @directory %>/html/:/usr/share/php/:/tmp/\ndisable_functions=exec,shell_exec,system,passthru,popen"
</VirtualHost>
<Directory <%= @directory %>/html>
Require all granted
+
+ <FilesMatch ".+\.ph(ar|p|tml)$">
+ SetHandler "proxy:unix:/run/php/<%= @name %>.sock|fcgi://127.0.0.1"
+ </FilesMatch>
</Directory>
include_recipe "apache"
include_recipe "git"
include_recipe "mysql"
-include_recipe "php::apache"
+include_recipe "php::fpm"
package %w[
php-cli
notifies :reload, "service[apache2]"
end
+php_fpm "donate.openstreetmap.org" do
+ php_admin_values "open_basedir" => "/srv/donate.openstreetmap.org/:/usr/share/php/:/tmp/",
+ "disable_functions" => "exec,shell_exec,system,passthru,popen,proc_open"
+end
+
apache_site "donate.openstreetmap.org" do
template "apache.erb"
end
DocumentRoot /srv/donate.openstreetmap.org
- ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/srv/donate.openstreetmap.org/:/usr/share/php/:/tmp/\ndisable_functions=exec,shell_exec,system,passthru,popen"
-
# Alias Dynamic Content to data folder to avoid serving dummy git content
Alias /donors-eur.csv /srv/donate.openstreetmap.org/data/donors-eur.csv
Alias /donors.csv /srv/donate.openstreetmap.org/data/donors.csv
Redirect permanent /server2015 https://donate.openstreetmap.org/
<Directory /srv/donate.openstreetmap.org>
- Require all granted
+ Require all granted
+
+ <FilesMatch ".+\.ph(ar|p|tml)$">
+ SetHandler "proxy:unix:/run/php/donate.openstreetmap.org.sock|fcgi://127.0.0.1"
+ </FilesMatch>
</Directory>
<Directory /srv/donate.openstreetmap.org/scripts>