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.

This is my first attempt at setting up virtual hosts in Apache. I am trying to set up the subdomain test.mysite.com for mysite.com.

My VPS had Apache already installed on it. In /var/wwwthere was an index.html file live and running. What I have done since is:

  1. Created /var/www/main/ which is now the default document root,
  2. Created /var/www/test/ which is the content to be served by my virtual host,
  3. Copied /etc/apache2/sites-available/default to etc/apache2/sites-available/test.mysite.com.
  4. Run a2ensite test.mysite.com with a successful message that the site is enabled,
  5. Run service apache2 reload to reload the server.

These are the first lines that I have modified in etc/apache2/sites-available/test.mysite.com:

<VirtualHost *:80>
    ServerName test.mysite.com
    ServerAdmin webmaster@test.mysite.com

    DocumentRoot /var/www/test
    ...

According to all the guides and tutorials I have found, the subdomain should now be up and running. But my browser can't find the page. Is there anything else I need to do to get my subsite up and running?

EDIT: SOLVED The answer had nothing to do with the apache configuration files. I just had to register the subdomain at my hosting provider. I will mark this as the answer when I'm allowed.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The answer had nothing to do with the apache configuration files. I just had to register the subdomain at my hosting provider.

share|improve this answer

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.