]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mediawiki/templates/default/apache.erb
Merge remote-tracking branch 'github/pull/577'
[chef.git] / cookbooks / mediawiki / templates / default / apache.erb
index 586f2391e6ede6d9f5a23408929758b0f95c5794..fd23a53418ef1aa5395e262cd5a5c19308d70a5b 100644 (file)
@@ -32,8 +32,9 @@
 
   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"
+  AllowEncodedSlashes NoDecode
+
+  ProxyTimeout 300
 
   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/php-<%= @name %>-fpm.sock|fcgi://127.0.0.1"
+    </FilesMatch>
   </Directory>
 
   <Directory <%= @directory %>/w/images/>