Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a web developer and I've requested our Sys-Admin to setup a server for my team that will be used as a development environment.

The PHP is running as a CGI. When i try to open http://myaddress/ I receive 403 Forbidden. When I try to open http://myaddress/index.php everything is fine.

How do I set the server to look for index.php file by default?

P.S The sysadmin is not currently here, so he cannot do it for me.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Or put it into /etc/apache2/httpd.conf somewhere, but remember to comment old directive (i.e. index.html). On Windows file is located somewhere else.

share|improve this answer
    
It will be globally set. –  DSkowronski Jul 4 '12 at 9:20

Use the DirectoryIndex directive:

DirectoryIndex index.php

Here's more info on how to use DirectoryIndex.

share|improve this answer

If you use Apache and have no access to it's configuration you can place .htaccess file inside web site folder.

Just put following content in file .htaccess:

DirectoryIndex index.php
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.