Apache launches static content and flash application

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?

+3
source share
1 answer

See the AddHandler / mod_rewrite solution at the end of the section:

http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive

0
source

All Articles