我有一个烧瓶应用程序通过wsgi运行。
为了教训我的应用程序的负载,它加载了很多东西,我想通过apache提供我的主页或根url,但是我在尝试通过apache发送“/”静态索引文件时遇到了冲突,然后其他的都发送到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>

有什么帮助吗?

最佳答案

请参阅本节末尾的AddHandler/mod_rewrite解决方案:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive

关于python - Apache运行静态内容和Flask应用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10678394/

10-12 21:38
查看更多