Apache 2.2 Virtual Hosts won't serve index.html
I've hosted my own apache2.2 server on debian lenny for a while now, and the other day, I went to set up a new virtual host with an index.html file in the document root. I had to actually type index.html in the end of the url for the page to display. Otherwise I get a 404 "Not Found" "The requested URL / was not found on this server." All of my other virtual hosts work fine. I then realized that all other pages were index.php, so I checked the DirectoryIndex directive, and index.html is at the front of the list. I did try to move it down the list out of desperation, but it didn't help. I then changed my index.html to index.php, and sure enough, it came up correctly. Index.htm is also in the DirectoryIndex directive, but changing it to that didn't work either. The php thing does seem to work fine, but I'd really like to figure out whats going on. Also, in my test setup, with a .htm and .html file (I have attempted with only one or the other) when trying to access the site, my error log shows "Attempt to serve directory: /var/www/test/" for every attempt. Any help is greatly appreciated.
|
Quote:
In your virtual host section try putting DirectoryIndex index.html I was facing the same problem & it got resolved with this extra directive in my virtual host container. Regds Sushant Chawla Linux Administrator |
Thank you for your reply. I had tried that previously, but I tried it again hoping I'd made a mistake before. Unfortunately its a no-go. Any other ideas?
|
Quote:
Regds Sushant Chawla Linux Administrator |
I encountered today the same problem using Apache 2.2.18.
Do you have any other virtual host defined under the same document root? I mean if your configuration is this way: VHOST A uses: DocumentRoot /home/test/public_html VHOST B uses: DocumentRoot /home/test/public_html/test It causes that error. It's getting even more interesting, my another shell that uses 2.2.17, does not have this error. After configuring VHOST B to it's own documentroot, it solved this issue for 2.2.18 |
All times are GMT -5. The time now is 06:36 AM. |