Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
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?
Can you send me the configurations of your apache file?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.