Thread: Apache + PHP
View Single Post
Old 25th April 2005, 14:41
jojo jojo is offline
Junior Member
Join Date: Apr 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

I had to set up a Wikimedia Wiki once, and it needs the same feature for certain directories for security reasons. I had to put the following lines in the virtual host container in my httpd.conf:

<IfModule !mod_php4.c>
    <Files ~ '.php$'>
        Order allow,deny
        Deny from all
        Allow from none
    <Files ~ '.phps'>
        Order deny,allow
        Allow from all
That's for Apche 1.3 and PHP4. If you use Apache 2.0, use

<IfModule !sapi_apache2.c>
instead of

<IfModule !mod_php4.c>
And don't forget to restart your Apache!

Reply With Quote