Disabeling PHP in Apache

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Apr 30, 2009 7:43 am

Disabeling PHP in Apache

Postby murdoch84 » Thu Apr 30, 2009 7:52 am


I would like to be able to disable PHP for perticular directories within a VirtualHost in apache but to make things a little more complicated, I would like it disabled for the root directory but enabled for a sub directory.

I have read that I can disable PHP on a virtual host by adding this into the VirtualHost section in the apache config:
php_flag engine off

And so have tried this variation to get the desired result:

php_flag engine off
<Directory "/path/to/dir/">
php_flag engine on

However this didn't work, any ideas how else I may be able to do this short of just simply running the php app on a different virtual host?

Return to “PHP Installation”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest