I have a server which hosts multiple domains. A couple of days ago I had to re-install apache, and after that typing the IP address in the browser returns a 404 error. I still can access all the sites hosted correctly through the domain names.
For example, say the domain name myserver.com pointed to /var/www. When I type http://myserver.com I get the page hosted in /var/www, but the IP address returns 404. I cannot access http:///index.html or anything like that.

I'm practically a n00b when it comes to situations like these. I'd checked apache's configuration files but couldn't understand what has gone wrong.
Sorry if my question is unclear, please do tell me if I've to add anymore info on this.

Thanks

link|improve this question

20% accept rate
feedback

1 Answer

Most likely your Apache is using name-based virtual hosting and has no default virtual host defined in case host name is missing in http request. Or then the default virtual host has no content at all. Post your config.

link|improve this answer
Ok, I've found what the problem was. The default virtual host configuration was disabled. a2ensite default fixed the problem. Thanks for the comment. – shyam Sep 22 '11 at 7:35
Glad I was able to help! :) – Janne Pikkarainen Sep 22 '11 at 8:00
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.