Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 pointed to /var/www. When I type 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.


share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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