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

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

I have been trying to configure virtual servers to my websites without any luck. I'm running on Debian 2.6.32 on a VPS. I have configured the virtual servers with many configurations and have left it relatively simple for testing (I only enabled Here are my three virtual hosts:

<VirtualHost *:80>
DocumentRoot "/srv/www/"
<Directory "/srv/www/">
allow from all
Options +Indexes

<VirtualHost *:80>
DocumentRoot /srv/www/
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory /srv/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

and here is my /etc/hosts file:

fe00::0     ip6-localnet
ff00::0     ip6-mcastprefix
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.  serv1 epicbackroads   johnpwarren voip.johnpwarren
::1     localhost ip6-localhost ip6-loopback

and /etc/resolv.conf:


as well as a curl check:

# curl -I
HTTP/1.1 200 OK
Date: Mon, 27 May 2013 09:16:40 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Mon, 27 May 2013 05:05:00 GMT
ETag: "32237e0-4f-4ddac173588f2"
Accept-Ranges: bytes
Content-Length: 79
Vary: Accept-Encoding
Content-Type: text/html
X-Pad: avoid browser bug

However, browser continues to throw an error "Server cannot be found". What else should I be looking into?

UPDATE: Also, I ran telnet and received this:

telnet 80
Connected to
Escape character is '^]'.
Connection closed by foreign host.
share|improve this question
up vote 0 down vote accepted

The Apache configuration you posted is incomplete or invalid altogether.

The 2nd Virtual Host has a syntax error (missing '<')

VirtualHost *:80>

and it does never close. Missing:


Also you are missing ServerName on each Virtual Host.

Apache will not know which Virtual Host to serve and will default to the first in the configuration.

Apart from that, the issue with seems to be your DNS configuration. does not resolve to any IP address.

You server can resolve the domain because you have manually configured it on the /etc/hosts file but your PC cannot resolve this domain so it won't load anything.

share|improve this answer
I apologize for my poor pasting, I have fixed it above. I have pointed the nameservers to my new host and have updated the A records to point to the IP I was given. Is there something that I'm missing? – John Warren May 27 '13 at 10:11
The domain does not return any IP back. And if I try to resolve it returns 'server error'. Are the DNS zones hosted on your server? – Cha0s May 27 '13 at 10:27
No, the zones are not hosted directly on my vps. I am using the nameservers of the host as well as their dns configuration found in the customer management area. I changed the A record of the domains to the IP of the server. – John Warren May 27 '13 at 10:30
It looks ok now. I can properly resolve the domain and a page with a 'EpicBackRoads'message loads now. – Cha0s May 27 '13 at 10:31
Ok, so it wasn't my fault then. Unless my webhost fixed it for me. Yep just confirmed that I didn't input the A record correctly. I put in the server name and thought I had to put the full one, but was just prepending it to the root of the domain. – John Warren May 27 '13 at 10:35

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.