Reputation: 145
Migrated from Apache (Godaddy) to Nginx (DigitalOcean), the PHP code below in index.html does not work and as a result, the footer portion of the site disappeared. It works fine on the old server.
<? include("includes/copyright.php") ?>
Server details:
Ubuntu 20.04
PHP 7.14.15
Nginx 1.18.0
sudo systemctl list-units 'php*'
Upvotes: 0
Views: 248
Reputation: 329
in your nginx config, update line starting with location ~ \.php(/|$) {
with:
location ~ \.(php|html|htm)$ {
then restart services. This will allow your html files to be parsed through php
If passing to fastcgi does not work, you can add a directive to your php-fpm config:
security.limit_extensions = .php .html
Upvotes: 0