簡體   English   中英

Apache運行靜態內容和燒瓶應用程序

[英]Apache running static content and flask app

我有一個通過wsgi運行的Flask應用程序。

為了加載我的應用程序上的負載,它加載了很多東西,我想通過apache提供我的主頁或root 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM