After you’ve installed apach2, php5, mysql, etc, you test it with http://localhost and all you get is this “It Works!” crap. You can actually create an index.php page that looks like:
phpinfo();
?>
and you can actually type in http://localhost/index.php and get your phpinfo page coming out. But it seems nowhere in the docs can you find out how to get apache2 to recognize index.php as the first page to deliver.
So, I found out where, finally. In your WAMP environment there’s only the http.conf file, you look for the DirectoryIndex, and move index.php or insert “index.php” to the front of the line. In this ubuntu 9.10 LAMP setup, where the hell is the file?
/etc/apache2/mods-available/dir.conf
That’s where it is. open the file, it looks like this after your normal lamp setup in this environment
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</ifmodule>
Notice the “index.php” somewhere in the DirectoryIndex list … move that to the front of the list as in
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</ifmodule>
