Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I have a server that hosts Then I have a server that hosts

On the server, how do I make subdomains? For instance I want to create

I have my site in /home/USER/public_html and it is working just fine. But When I try to create, it says Server not found in the browser. I have tried so many configurations in my /etc/hosts and /etc/apache2/sites-available/, without any luck

Can I get some detailed instructions maybe? I have looked everywhere and every place tells you different, with no luck.

Ubuntu Server 11.10 w/ the Lamp Stack option

share|improve this question
What software/service provides the answers for – user8290 Dec 6 '11 at 21:48
I am not sure what you mean. Could you explain that more? – joe Dec 6 '11 at 22:08
Hard to know, can you pastebin your /etc/hosts as well as your configuration files. – bodhi.zazen Dec 6 '11 at 22:09
/etc/hosts: – joe Dec 6 '11 at 22:35
/etc/apache2/sites-available/ – joe Dec 6 '11 at 22:39

You should put your subdomain2 DocumentRoot in your /etc/apache2/sites-available/default like this:

<VirtualHost *:90>
    DocumentRoot /home/USER/public_html
    <Directory /home/USER/public_html/>
        Options FollowSymLinks
        AllowOverride All
share|improve this answer
You shouldn't put it in the default, that's really not a best practice for multiple virtual hosting – Marco Ceppi Mar 5 '12 at 14:31

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.