logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: index.php not the main index.
Author
Cptn-phantom



Joined: 19 Aug 2011
Posts: 1
Location: UK

PostPosted: Fri 19 Aug '11 3:06    Post subject: index.php not the main index. Reply with quote

Hi guys, My problem is that when i go to localhost it says Index of /
: Index.php
rather than displaying the PHP file. In short it loads a directory view instead of the actual index.php file. It works fine when i put a index.html file in there or go to localhost/index.php. The index.php file is the only file in there at the moment, no directory's either. I have restarted Apache several times and have reinstalled Apache and php 2 times. I dont know what to do, Please help me.
Question
PS : i have included my httpd.conf and my index.php file.

PHP File :

Code:
<?php

   echo "Nothing to see here";
   
?>



HTTPD.CONF File :

Admin note:

File removed, see forum rules: Do not paste whole configuration files......
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 19 Aug '11 7:10    Post subject: Reply with quote

The thing you want to look at is the DirectoryIndex directive, like add index.php to the list

http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex
Back to top


Reply to topic   Topic: index.php not the main index. View previous topic :: View next topic
Post new topic   Forum Index -> Apache