Skip to content
Snippets Groups Projects
Commit 63d00537 authored by Dimitra Chatzichrysou's avatar Dimitra Chatzichrysou
Browse files

Update httpd config to sevre php files

parent 8e1e9c43
No related branches found
No related tags found
1 merge request!49Update httpd config to sevre php files
...@@ -118,7 +118,25 @@ data: ...@@ -118,7 +118,25 @@ data:
Require all denied Require all denied
</Files> </Files>
AddType application/x-httpd-php .php # The following lines prevent .user.ini files (PHP config files) from being viewed by Web clients.
<Files ".user.ini">
Require all denied
</Files>
# Allow php to handle Multiviews
AddType text/html .php
# Redirect to local php-fpm (no mod_php in default configuration)
<FilesMatch ".+\.php$">
# To avoid executing something unexpected it is critical to verify that the file
# actually exists in the filesystem!
# cf. https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=115522405
<If "-f %{REQUEST_FILENAME}">
# Enable http authorization headers
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</If>
</FilesMatch>
<IfModule mime_module> <IfModule mime_module>
TypesConfig /etc/mime.types TypesConfig /etc/mime.types
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment