Forum Moderators: phranque

Message Too Old, No Replies

Setting a PHP page as index page

         

sjaaq

8:23 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



Hello,

I'd like to set an index.php on Apache 2.0.54(RedHat9) as an index page.
I removed all standard html pages from the htdocs directory, and left an index.php, when I call eg 192.168.2.104 with my browser I just get a directory structure.

Do I have to edit httpd.conf, if so what?

Thanks in advance

mack

8:33 pm on Jul 23, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You need to specify index.php in your directory index section within your httpd.conf file.

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php index.cgi
</IfModule>

Mack.

sjaaq

9:22 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



thanks a lot!

mack

9:29 pm on Jul 23, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Remember it is always a good idea to make a backup of your httpd.conf file when ever you make any changes.

Also you need to restart apache after you make changes before they will come into effect.

Mack.