Edit report at https://bugs.php.net/bug.php?id=60763&edit=1
ID: 60763
User updated by: nbari at dalmp dot com
Reported by: nbari at dalmp dot com
Summary: Access denied. when file extension is .html
-Status: Open
+Status: Closed
Type: Bug
Package: FPM related
Operating System: FreeBSD / Mac OS
PHP Version: 5.3.9
Block user comment: N
Private report: N
New Comment:
php 5.3.9 adds support to chose what extensions to parse
the solution was to add the next line the php-fpm.conf
security.limit_extensions = .php .html
Previous Comments:
------------------------------------------------------------------------
[2012-01-15 23:27:57] nbari at dalmp dot com
Description:
------------
When serving .html files as php an "Access denied." is displayed instead of the
properly parsed page.
With php versions <= 5.3.8 the following configuration example works for nginx
--
server {
server_name domain.tpl *.domain.tld;
root /home/sites/domain.tld/home/html;
location ~ \.(php|htm|html)$ {
fastcgi_pass unix:/tmp/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
--
files on /home/sites/domain.tld/home/html are:
http://domain.tld/index.html <--- does not work with php-5.3.9 display an
Access
denied.
http://domain.tld/test.php <--- works
Expected result:
----------------
properly parse the .html and display the content.
Actual result:
--------------
Access denied.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60763&edit=1