I have a Flask app running via wsgi
.
To lesson the load on my app, which loads a lot of stuff, I would like to serve up my home page, or root url via apache, but I am getting conflicts trying to send "/" a 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?
See the AddHandler/mod_rewrite solution at end of section:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.