I have a Flask application running through wsgi.
To take the load off of my application, which loads a lot of things, I would like to serve the homepage or root URL via apache, but I get conflicts trying to send the "/" static index file via apache, and then everything else to wsgi:
<VirtualHost *:80>
ServerName www.yada.com
Alias /static /home/ubuntu/yada/static
<Location /static>
SetHandler None
</Location>
WSGIDaemonProcess yada
WSGIScriptAliasMatch /.+ /home/ubuntu/yada/wsgi.py
<Directory /home/ubuntu/yada>
RewriteEngine On
RewriteRule ^/$ /static/html/index.html [L]
WSGIProcessGroup postwire
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
</Directory>
</VirtualHost>
Any help?
source
share