title: Adding a Django site breaks my virtual hosts on CentOS 7
body: <p>I have a <strong>CentOS 7 server</strong> with about 20 domains all managed automatically with a <strong>vhosts file in /etc/httpd/conf.d</strong>.</p>
  
  <p>I am trying to learn <strong>Django</strong> and wanted to set up a single domain using it, so I added a specific virtualhost to the .conf file.</p>
  
  <p>The result is that the Django domain works fine but <strong>all the other sites are broken</strong> (try to use Django but cause errors).</p>
  
  <p>The Django domain has <strong>two folders:</strong> <strong>djangodomain.com</strong> for static files and <strong>djangodomain.app</strong> for the Python files.</p>
  
  <p><strong>How can I integrate a single Django domain into my existing many-domain virtual host setup?</strong></p>
  
  <p>Existing vhosts.conf:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      serveradmin username@domain.com
      serveradmin username@domain.com
  
      usecanonicalname off
  
      # www.site.com » site.com
      rewriteengine on
      rewritecond %{HTTP_HOST}    ^www\.(.*)$ [nc]
      rewriterule ^(.*)$          http://%1   [r=301,l]
  
      # file locations
      virtualdocumentroot "/home/username/%0"
  
      &lt;directory "/home/username/*"&gt;
          allowoverride all
          require all granted
          options indexes followsymlinks
          options +execcgi
          options +includes
      &lt;/directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>What I added that broke all but the Django site:</p>
  
  <pre><code>&lt;VirtualHost djangodomain.com:80&gt;
      ServerName djangodomain.com
      ServerAlias www.djangodomain.com
      ServerAdmin user@domain.com
  
      DocumentRoot /home/username/djangodomain.com
  
      WSGIScriptAlias / /home/username/djangodomain.app/django.wsgi
  
      &lt;Directory /home/username/djangodomain.app&gt;
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  
      Alias /robots.txt /home/username/djangodomain.com/robots.txt
      Alias /favicon.ico /home/username/djangodomain.com/favicon.ico
      Alias /images /home/username/djangodomain.com/images
      Alias /static /home/username/djangodomain.com/static
  
      ErrorLog /home/username/djangodomain.logs/error.log
      CustomLog /home/username/djangodomain.logs/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Crossposted to <a href="https://unix.stackexchange.com/questions/318012/adding-a-django-site-breaks-my-virtual-hosts-on-centos-7">unix.stackexchange.com</a></p>