title: Issue when setting-up wsgi as an alias path in apache
body: <p>NOTE: This question is different from '<a href="https://stackoverflow.com/questions/18967441/add-a-prefix-to-all-flask-routes">Add a prefix to all Flask routes</a>' as I am trying to resolve this at apache level. Additional, the suggested fix for flask routes did not work!</p>
  
  <p>Following on from <a href="https://stackoverflow.com/a/1020696/2761030">this post</a>, I'm trying to set up apache to serve PHP files by default, but point a given alias (i.e. <code>/flaskapp</code>) to a wsgi path. The wsgi file in turn routes requests to a python flask app.</p>
  
  <p>Here's the apache config that I'm trying (under <code>000-default.conf</code>):</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerName localhost
          ServerAdmin webmaster@localhost
  
          Alias / /var/www/html/
          &lt;Directory "/var/www/html"&gt;
              Order Deny,Allow
              Allow from all
              Require all granted
          &lt;/Directory&gt;
  
          WSGIScriptAlias /flaskapp "/var/www/flaskapp/deploy.wsgi"
          &lt;Directory /var/www/flaskapp&gt;
                   Options +ExecCGI
                   Order allow,deny
                   Allow from all
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>After doing a <code>service apache2 restart</code> I find that requests to <code>http://myip/flaskapp</code> result in a 404 error. Everything else works fine.</p>
  
  <p>Things I've tried so far:</p>
  
  <ul>
  <li>Double checking all the file and folder paths (no issues found)</li>
  <li>Using the wsgi part of the above code to set up the wsgi app as a standalone virtualhost (works fine)</li>
  <li>Adding <code>app.config['APPLICATION_ROOT'] = '/flaskapp'</code> to my app.py file, as suggested the question '<a href="https://stackoverflow.com/questions/18967441/add-a-prefix-to-all-flask-routes">Add a prefix to all Flask routes</a>' (Didn't have any effect)</li>
  </ul>
  
  <p>Where could I be going wrong?</p>