2

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.

3 Answers3

4

Use the DirectoryIndex directive:

DirectoryIndex index.php

Here's more info on how to use DirectoryIndex.

Jenny D
  • 27,358
  • 21
  • 74
  • 110
3

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
Anton
  • 115
  • 10
2

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.

DSkowronski
  • 150
  • 3