property :recaptcha_public_key, :kind_of => String
property :recaptcha_private_key, :kind_of => String
property :extra_file_extensions, :kind_of => [String, Array], :default => []
+property :fpm_max_children, :kind_of => Integer, :default => 5
property :reload_apache, :kind_of => [TrueClass, FalseClass], :default => true
action :create do
domains [new_resource.site] + Array(new_resource.aliases)
end
+ php_fpm new_resource.site do
+ pm_max_children new_resource.fpm_max_children
+ php_admin_values "open_basedir" => "#{site_directory}/:/usr/share/php/:/dev/null:/tmp/"
+ php_values "memory_limit" => "500M",
+ "max_execution_time" => "240",
+ "upload_max_filesize" => "70M",
+ "post_max_size" => "100M"
+ end
+
apache_site new_resource.site do
cookbook "mediawiki"
template "apache.erb"
DocumentRoot <%= @directory %>
- ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=<%= @directory %>/:/usr/share/php/:/dev/null:/tmp/"
- ProxyFCGISetEnvIf "true" PHP_VALUE "memory_limit=500M\nmax_execution_time=240\nupload_max_filesize=70M\npost_max_size=100M"
-
RewriteCond %{SERVER_NAME} !=<%= @name %>
RewriteRule ^/(.*)$ https://<%= @name %>/$1 [R=permanent]
<Directory <%= @directory %>>
Options -Indexes
Require all granted
+
+ <FilesMatch ".+\.ph(ar|p|tml)$">
+ SetHandler "proxy:unix:/run/php/<%= @name %>.sock|fcgi://127.0.0.1"
+ </FilesMatch>
</Directory>
<Directory <%= @directory %>/w/images/>
"wiki.openstreetmap.pro", "wiki.openstreetmaps.org"]
directory "/srv/wiki.openstreetmap.org"
+ fpm_max_children 25
+
database_name "wiki"
database_user "wiki-user"
database_password passwords["database"]