We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,527 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

5
Contributors
8
Replies
4 Months
Discussion Span
2 Years Ago
Last Updated
9
Views
Question
Answered
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

Check the parse handler.

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

Ok i'll give that a go

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

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0855 seconds using 2.78MB