Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I set up a vanilla Ubuntu Server installation,

Other computers on the network can access its webserver with http://servername/

But when I try to access sub domains (e.g. http://something.servername/) it doesn't work.

Any ideas?

Thanks.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

servername is not a domain, it's a hostname (computername) so you can't have a subdomain of it. Your domain name would look something like mydomain.com.

If you have a domain like mydomain.com and servername is a part of it (that is, has a dns host record in the domain), then the first URL you have would be http://servername.mydomain.com

If you want to have a subdomain then it needs to first be created in dns. Let's call it subdomain.mydomain.com. At that point you then need a host record in the subdomain to have a valid URL. Something like http://servername.subdomain.mydomain.com.

share|improve this answer
    
I don't think so. I just put something.servername into all 'hosts' files; a bit of a hack but it works. Thanks for the info. –  aidan Oct 2 '09 at 16:03
    
Ok. Understand, though, that your machine will interpret servername as the domain name and something as a host name. You have not created a subdomain. This could mess with your apache config. –  squillman Oct 2 '09 at 16:09
add comment

Your Answer

 
discard

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.