title: How to fix ERROR: Site domain.com does not exist, while adding subdomain to apache2?
body: <p>I'm trying to add subdomains to my home server.</p>
  
  <p>svn.domain.com
  trac.domain.com</p>
  
  <p>Due to dynamic IP I use dyndns service, on top of that I have domain.com hosted somewhere else. I created CNAME for subdomains on remote host to point to my user.dyndns.org domain.</p>
  
  <p>So now when I visit either of subdomains: trac or svn, I see "It works!" message.</p>
  
  <p>This done, I created two virtual host files under /etc/apache2/sites-enabled</p>
  
  <p>file1: svn.domain.com and file2: trac.domain.com</p>
  
  <p>contents:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
    ServerName trac.domain.com
  
     DocumentRoot = /var/www/trac/repos
  
     &lt;Directory /var/www/trac/repos&gt;
      Order allow,deny
      allow from all
     &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
    ServerName svn.domain.com
  
     DocumentRoot = /var/svn/repos
  
     &lt;Directory /var/svn/repos&gt;
      Order allow,deny
      allow from all
     &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>But I get error: ERROR: Site trac.domain.com does not exist!</p>
  
  <p>what am I doing wrong?</p>