Mercurial > repos > other > Puppet
diff modules/website/files/conf.extra/html-php.conf @ 112:5967c1b18860 puppet-3.6
Make sure that we don't leak PHP source code if something breaks
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 04 Jun 2016 14:06:15 +0100 |
parents | 440ea809487c |
children | aad5c00b0525 |
line wrap: on
line diff
--- a/modules/website/files/conf.extra/html-php.conf Sat Jun 04 14:05:14 2016 +0100 +++ b/modules/website/files/conf.extra/html-php.conf Sat Jun 04 14:06:15 2016 +0100 @@ -1,10 +1,18 @@ # Make sure we have PHP Include conf.extra/php.conf -# -# Cause the PHP interpreter to handle files with a .html extension. -# -AddHandler php5-script .html -AddType text/html .html + +<IfModule php7_module> + # + # Cause the PHP interpreter to handle files with a .html extension. + # + AddHandler php7-script .html + AddType text/html .html -#If we're doing HTML files as PHP then swap the priority for directory indexing -DirectoryIndex index.html index.php + #If we're doing HTML files as PHP then swap the priority for directory indexing + DirectoryIndex index.html index.php +</IfModule> +<IfModule !php7_module> + <FilesMatch "\.html$"> + Require all denied + </FilesMatch> +</IfModule>