teejayuu Posted July 5, 2006 Share Posted July 5, 2006 HiI 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.ThanksTJ Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 5, 2006 Share Posted July 5, 2006 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\confNow scroll down and find the following:DirectoryIndex index.html index.html.varNow add a space after index.html.var and add index.phpSave your httpd.conf file. Once saved restart Apache server. When you goto http://localhost it shoudl automatically load index.php Quote Link to comment Share on other sites More sharing options...
teejayuu Posted July 9, 2006 Author Share Posted July 9, 2006 Thanks WildTeen88 - it worked a treat. I have been trying for months to get this sorted. ;D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.