I'd like nginx to parse particular html page(s) as php
- for example, I have a php contact form I'd like to keep calling contact.html,
but don't need php on most of my other html pages.
I've been able to parse _all_ html pages with these:
in virtual.conf -
#location ~ \.php$ {
location ~ \.(php|html|htm)$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/website$fastcgi_script_name;
include fastcgi_params;
}
in /etc/php-fpm.d/www.conf -
security.limit_extensions = .html .php .php3 .php4 .php5
but feel it's overkill and could hurt nginx performance?
Thanks,
sm
- for example, I have a php contact form I'd like to keep calling contact.html,
but don't need php on most of my other html pages.
I've been able to parse _all_ html pages with these:
in virtual.conf -
#location ~ \.php$ {
location ~ \.(php|html|htm)$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/website$fastcgi_script_name;
include fastcgi_params;
}
in /etc/php-fpm.d/www.conf -
security.limit_extensions = .html .php .php3 .php4 .php5
but feel it's overkill and could hurt nginx performance?
Thanks,
sm