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

I need to set up my computer to serve pages to all computers on the LAN. The main page of my site (i.e. the one with out a sub-domain) works, the other computers can access it at http://vulpecula (the name of my computer) but when they try to access the subdomains they get redirected to www.subdomain.vulpecula, which doesn't work.

Strangely when I go to the subdomain on my own computer it doesn't redirect and works fine. I have also tried with all lowercase server names, but this makes no difference.

I've included the contents of 2 files below for help:

/etc/hosts:    Vulpecula    # Added by NetworkManager    localhost.localdomain    localhost
::1    Vulpecula    localhost6.localdomain6    localhost6 subdomain.vulpecula extra.vulpecula subdomain.vulpecula extra.vulpecula

#::1    Vulpecula    localhost6.localdomain6    localhost6
#    Vulpecula

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


NameVirtualHost *:80

<VirtualHost *:80>

DocumentRoot /home/thomas/hello
<Directory />
Options FollowSymLinks
 AllowOverride None

<VirtualHost *:80>
ServerName subdomain.vulpecula
DocumentRoot /home/thomas/sub/0.0.6

<VirtualHost *:80>
ServerName extra.vulpecula
DocumentRoot /home/thomas/hello
share|improve this question

1 Answer 1

You can either:

  1. Put subdomain.vulpecula into the /etc/hosts files of all clients; or
  2. Put subdomain.vulpecula into your LAN's internal DNS.

What is likely happening on the other computers on your LAN is that subdomain.vulpecula is an unknown name, so their browsers tack on the 'www.' prefix in an attempt to find a name that resolves. Once you have ensured that subdomain.vulpecula resolves to a valid IP address, this problem should go away.

share|improve this answer
Thanks for the reply, how do I add to the LANs DNS? – user57499 Oct 18 '10 at 20:35
@TomC: I think that should probably be a separate question! The short answer is: consult your DNS server's documentation. – Steven Monday Oct 18 '10 at 21:05

Your Answer


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