Ever since I moved to Linux, I noted some strange behaviour. In Ubuntu, http://localhost/index
works but on WAMP it does not work. I tested this with APACHE's rewrite module set to off on both. Any good explanation?
Apache.conf (LAMP)
etc/apache2/sites-enabled/000-default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Apache.conf WAMP
<Directory "C:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
</Directory>
Because of the directive Options Indexes FollowSymLinks MultiViews
on LAMP (ubuntu), the url localhost/index can resolve to the file index.php, index.html. So foo would also result into foo.php, foo.html. A proper explanation can be derived from http://httpd.apache.org/docs/current/content-negotiation.html
It is because of this option in Apache Conf:
Options FollowSymLinks
Are you sure the apache.conf file and the site configuration files are the same?
From the looks of it, one's DirectoryIndex is index.php, while the other has index as the DirectoryIndex. For more information about DirectoryIndex see http://httpd.apache.org/docs/2.2/mod/mod_dir.html