How to set / change default page in Apache
Here i will show how to set or change default page in Apache. Apache default page is very easy to configure, we just need to configure Apache conf file in following location
Apache file path/conf/httpd.conf
Make the following changes in httpd.conf file. Change index.html or index.php to whatever default page you want.
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
Restart Apache ~ Done.
Hi I’m very new this and can’t figure out what the apache path name is please help! Thank you
Hi Mykong,
I am getting Apache2 Debian Default page in Windows OS. Could you please help on how to get rid of this issue. PS: I am a beginner
Hi mkyong, I surely did something wrong.
Using Ubuntu 12.04 + LAMP (fresh install), I try to point to /var/www/Leclerc/index.php
I still stuck with apache2’s default page (/var/www/index.html) that displays “It works!” (I did restart, of course)
None of these lines works:
DirectoryIndex Leclerc/index.php
DirectoryIndex www/Leclerc/index.php
DirectoryIndex /var/www/Leclerc/index.php
I see that apache2.conf correctly includes httpd.conf
What the matter in my Apache?
I share my answer:
Set “DirectoryIndex Leclerc/index.php” to apache2.conf and leave httpd.conf alone.
Thanks for the sollition, its works on Ubuntu 12.04.
Yes it work ! .. That’s nice . Thank u very much …
Thanks a lot.. its working fine..
thank you very much …..!!!!!!
HA …HA…HA…Its working
Thank you MKYou Again from true heart ..
MAY The God bless You
haha…welcome