In case you are trying to use NGINX to parse HTML like PHP, and you get the " Access denied in Access denied " error message, you need to change the PHP configuration setting.
On Ubuntu 16, the file to be updated is located in /etc/php/7.0/fpm/pool.d/www.conf .
Go to the line where it says ;security.limit_extensions =.php.php3.php4.php5.php7
Replace this with security.limit_extensions =.php.html . Note that the leading semicolon has been removed.
Then restart PHP sudo systemctl restart php7.0-fpm . The problem must be fixed.
See this more detailed guide for more information: The "Access Denied" error has been fixed when parsing HTML as PHP with Nginx.
source share