title: Apache2 and context path for virtual host with Django and AngularJS
body: <p>I had the following working Django configuration:</p>
  
  <pre><code>WSGIScriptAlias / /MyDjangoProjectFolder/MyDjangoProject/wsgi.py
  WSGIPythonPath /MyDjangoProjectFolder
  
  &lt;Directory /MyDjangoProjectFolder/MyDjangoProject&gt;
     &lt;Files wsgi.py&gt;
          Order deny,allow
         Require all granted
     &lt;/Files&gt;
  &lt;/Directory&gt;
  
  Alias /base_context_path/static/ /MyDjangoProjectFolder/static/
  
  &lt;Directory /MyDjangoProjectFolder/static&gt;
      Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>Django responds on <code>&lt;ip&gt;/base_context_path/rest</code> (for rest APIs invoked by the frontend) and <code>&lt;ip&gt;/base_context_path/admin</code> (for administration, which uses base_context_path/static).
  So everything needed by Django is on <code>&lt;ip&gt;/base_context_path/*</code>.</p>
  
  <p>Now I need to deploy a website developed in Angular on this same Apache2, so I am trying to understand how to make it work. I have a domain name for this website (mydomainname.org), but not a dedicated one for the django application. When visiting my domain name, I would expect my website to appear.</p>
  
  <p>This is my attempt for my website:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName mydomainname.org
      DocumentRoot /MyWebSiteFolder
      DirectoryIndex index.html
   &lt;Directory "/MyWebSiteFolder"&gt;
  # redirect rules for managing AngularJS
    &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>It does not work (403).</p>
  
  <p>For my Django application, this is the virtual host I created, which does not work as well (403):</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName mydomainname
  Alias /base_context_path/static/ /MyDjangoProjectFolder/static
  
  WSGIScriptAlias / /MyDjangoProjectFolder/MyDjangoProject/wsgi.py
  
  WSGIDaemonProcess MyDjangoProject python-path=/MyDjangoProjectFolder:/usr/local/lib/python2.7/site-packages
  WSGIProcessGroup MyDjangoProject
  
  
  &lt;Directory /MyDjangoProjectFolder/static&gt;
          Options -Indexes
      Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>So I am kind of stuck.</p>