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

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

Check the parse handler.

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.

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.

Ok i'll give that a go

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.

Great, I'm glad it helped!

is in ubuntu, apache web server the default of DirectoryIndex index.html, isn't it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.