Jump to content

Newbie question


teejayuu

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
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.