Apache not finding index.html by default
Hi,
I have a problem with my apache install on Ubuntu. It finds index.php by default but not index.html or.htm
I tried adding DirectoryIndex index.html index.htm index.php to apache2.conf but that didn't work. It just give a Forbidden Error unless there is an index.php present.
Regards,
James
jamesl22
Light Poster
38 posts since Feb 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
It seems that, there is no problem with apache configuration. The problem is with the access rights of the index.html and index.htm files. Now try the chown command and change the ownership of these files to same as index.php file.
For more information you can refer
http://www.checkupdown.com/status/E403.html
thewebhostingdi
Junior Poster
192 posts since Jun 2009
Reputation Points: 3
Solved Threads: 14
Skill Endorsements: 0
printrobin
Light Poster
47 posts since Jun 2009
Reputation Points: 20
Solved Threads: 1
Skill Endorsements: 0
It seems that, there is no problem with apache configuration. The problem is with the access rights of the index.html and index.htm files. Now try the chown command and change the ownership of these files to same as index.php file.
For more information you can refer
http://www.checkupdown.com/status/E403.html
Hi,
I think I hvn't made myself clear. If i go to www.mysite.com/index.html it appers. But if i go to www.mysite.com index.html is not automaticly readirected to. Index.html has all the right permissions.
jamesl22
Light Poster
38 posts since Feb 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Hi James,
I had a similar issue and I just found a solution, if you haven't already.
Here's how I solved it:
In my /etc/apache2/ folder I did a
grep -r "DirectoryIndex" .
I found I had
DirectoryIndex index.shtml
in my /etc/apache2/sites-available/default file.
After changing that line to DirectoryIndex index.html and reset the server it was working fine.
I hope it helps.
Tickon
Newbie Poster
6 posts since May 2009
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
jamesl22
Light Poster
38 posts since Feb 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Hi James,
I had a similar issue and I just found a solution, if you haven't already.
Here's how I solved it:
In my /etc/apache2/ folder I did a
grep -r "DirectoryIndex" .
I found I had
DirectoryIndex index.shtml
in my /etc/apache2/sites-available/default file.
After changing that line to DirectoryIndex index.html and reset the server it was working fine.
I hope it helps.
Thanks, that worked i had conflicting instances of DirectoryIndex. I specified it in my virtual host config instead.
jamesl22
Light Poster
38 posts since Feb 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Great, I'm glad it helped!
Tickon
Newbie Poster
6 posts since May 2009
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
is in ubuntu, apache web server the default of DirectoryIndex index.html, isn't it?
ahromi
Newbie Poster
5 posts since Apr 2009
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 2 Years Ago by
Tickon,
ahromi,
thewebhostingdi
and 1 other