Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


My apache2 virtual host is not working. And I've totally no idea on what the error is.

What happended?

I've one virtual host named v1, and it works fine. Then I copied sites-available/v1 to sites-avaliable/v2 and changed the v2's content. After that a a2ensite and service apache2 restart is performed.

The error

Oops! Google Chrome could not find

and empty error log in /var/log/XXX.log



<VirtualHost *:80>
DocumentRoot "/var/www/symphony/symphony-2"
ErrorLog "/var/log/apache2/symphony_errors.log"
CustomLog "/var/log/apache2/symphony_accesses.log" common    


<VirtualHost *:80>
DocumentRoot "/var/www/sf2piemoment"
ErrorLog "/var/log/apache2/piemoment_errors.log"
CustomLog "/var/log/apache2/piemoment_accesses.log" common    



Any ideas and suggestions? I'm totally confused on this. Please help me on this. P.S. I'm pretty new to linux...

share|improve this question
Are you sure your DNS is set? Unless you have no default site, when vhosts dont work you generally get taken to the wrong site (default), and not given that sort of error. – David Houde Jun 16 '13 at 12:38
@DavidHoude I added a hosts entry. Plz see the update. Terribly sorry for wasting your time. – SolessChong Jun 16 '13 at 13:39

The error "could not find" means that the address can't be resolved in DNS. Since there is no DNS answer, your browser doesn't know that it should ask your apache for the site, and that is why there is nothing in your apache logs.

So step one is to fix your DNS settings so that the domain actually resolves. After that, if there are still problems, you can ask about those problems.

As you are using a hosts file instead of a DNS entry, you can simply add more names to the line in /etc/hosts: localhost

all on the same line.

share|improve this answer
I added a hosts entry. Please see the update. Sorry for leaving this out. and terribly sorry for wasting your time. – SolessChong Jun 16 '13 at 13:37
Your hosts file does not contain, it only contains You need to actually write out the entire host name for each host; it doesn't do wildcards. – Jenny D Jun 16 '13 at 16:36
Oh, and thanks a lot for apologizing, I really appreciate it! I wish more people would act the way you do here! – Jenny D Jun 16 '13 at 16:37
I'm afraid there could be more problem since works but doesn't – SolessChong Jun 16 '13 at 17:47
Still, the answer remains that this is not an apache error. Could you try adding to the hosts file, too? I'm adding a line to explain how to do that. – Jenny D Jun 16 '13 at 18:34

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.