Jump to content

Archived

This topic is now archived and is closed to further replies.

teejayuu

Newbie question

Recommended Posts

Hi

I have Apache 2.0.2 installed on a local machine along with PHP 5.0.2 and MySQL 4.0.21 on Windows XP SP2. I am trying to learn web programming and use the local machine as a test bed before publishing. One thing that I have found is that if I type http://localhost if get a directory listing even if there is an index.php file. Is there some sort of configuration I can make to open the index.php file by just navigating to the folder containing it.

Thanks
TJ

Share this post


Link to post
Share on other sites
You'll need to append index.php to your DirectoryIndex line in the httpd.conf file. Heres how you do it:
Find and open the httpd.conf file for editing, for a defualt install of Apache it be in C:\program files\Apache Group\Apache 2\conf
Now scroll down and find the following:
DirectoryIndex index.html index.html.var

Now add a space after index.html.var and add index.php

Save your httpd.conf file. Once saved restart Apache server. When you goto http://localhost it shoudl automatically load index.php

Share this post


Link to post
Share on other sites
Thanks WildTeen88 - it worked a treat. I have been trying for months to get this sorted. ;D

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.