Hi,
Today's my first day with ISPConfig. I'm running ISPConfig 3.0.4.2 & nginx 1.0.12 on CentOS 6.2.
I am able to display HTML pages, and PHP pages, but any PHP inside of an HTML page does not execute. I realize that mixing PHP inside the HTML isn't optimal use of nginx, but I need the code to work until I get a chance to separate everything.
I've tried adding the following (copied from the '\.php$' directive) to the vhost file for the site, but when I do I get a 403 error when trying to display HTML files (with or without PHP inside):
Code:
location ~ \.html$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9011;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
}
I've also tried adding the following to the site's php-fpm.d conf file, but it doesn't seem to make a difference:
security.limit_extensions = .php .html
I've checked the error logs in /var/log/nginx, /var/log/php-fpm & the site's log did, but there are no errors related to this issue.
I've tried changing the user from nginx to apache in the site's 'Web' tab in ISPConfig, but I still get the 403 error when the '~ \.html$' directive is in the vghost file. When I remove that directive the HTML files display properly, but the PHP inside is not executed.
Any help would be greatly appreciated.
Thanks,
MSJ
Recent comments
10 hours 47 min ago
13 hours 43 min ago
14 hours 57 min ago
16 hours 20 min ago
17 hours 58 min ago
19 hours 27 min ago
20 hours 40 min ago
1 day 12 hours ago
1 day 13 hours ago
1 day 17 hours ago