title: Subdomain in a new conf or in the current?
body: <p>Im trying to setup <a href="https://stats.example.com" rel="nofollow">https://stats.example.com</a>, but I'm wondering if I should create a new stats.example.com.conf or if i can somehow add <code>stats</code> as a subdomain directly into <code>sites-available/example.com.conf</code>?</p>
  
  <p>Currently my example.com.conf looks like this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerName example.com
          ServerAlias www.example.com
          ServerAdmin no-reply@example.com
          DocumentRoot /var/www/example
  
          # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
          # error, crit, alert, emerg.
          # It is also possible to configure the loglevel for particular
          # modules, e.g.
          #LogLevel info ssl:warn
  
          ErrorLog ${APACHE_LOG_DIR}/example.com_error.log
          CustomLog ${APACHE_LOG_DIR}/example.com_access.log combined
  
  &lt;Directory /var/www/example&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          allow from all
  &lt;/Directory&gt;
          RewriteEngine on
          RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>The thing is that I'm planning to use <code>/var/www/stats</code> for multiple sites on the same host. And i figure it would be easier and cleaner to add the subdomain into each specific conf, instead of having multipel domain confs and subdomain confs.</p>
  
  <p>So instead of having</p>
  
  <ul>
  <li><code>example.com.conf</code></li>
  <li><code>stats.example.com.conf</code></li>
  <li><code>example2.com.conf</code></li>
  <li><code>stats.example2.com.conf</code></li>
  </ul>
  
  <p>I just have </p>
  
  <ul>
  <li><code>example.com.conf</code></li>
  <li><code>example2.com.conf</code></li>
  </ul>
  
  <h1>My question:</h1>
  
  <p><strong>Do I add the subdomain to the current config? Or do i make a new conf?</strong></p>