Jump to content


Photo

Newbie question


  • Please log in to reply
2 replies to this topic

#1 teejayuu

teejayuu
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 05 July 2006 - 06:37 PM

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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 05 July 2006 - 06:48 PM

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

#3 teejayuu

teejayuu
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 July 2006 - 07:06 PM

Thanks WildTeen88 - it worked a treat. I have been trying for months to get this sorted. ;D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users