Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 13th February 2012, 01:39
MainStreetJames MainStreetJames is offline
Junior Member
Join Date: Feb 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ISPConfig & nginx - PHP Inside HTML Files Not Executing

Today's my first day with ISPConfig. I'm running ISPConfig & 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):

        location ~ \.html$ {
            try_files $uri =404;
    	    include /etc/nginx/fastcgi_params;
            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.

Reply With Quote
Sponsored Links


config, ispconfig, nginx, php, php-fpm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6.0 support Acid_Scorpion Developers' Forum 47 16th September 2011 11:36
Cron errors guimnk General 1 5th April 2011 10:20
Newly Installed ISPConfig3 on Ubuntu 8.04 : login redirect fail ? cripperz Installation/Configuration 5 22nd March 2009 13:15
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20

All times are GMT +2. The time now is 16:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.