Score:0

WSGI overrides Apache auto-virtual hosts

ch flag

Using Apache2, I ran into this problem - WSGI overrides auto-virtual hosts. That is, example.com is running a Flask application, which is normal for me. But if I go to, say, foo.example.com, where there are other files, and also just index.html, then the same Flask application will appear again, and there will be no access to the files (error 404). How to separate WSGI from virtual hosts with files? Here is the config file:

<VirtualHost *:80>
    ServerAdmin myemail@example.com

    VirtualDocumentRoot /var/www/%1/
    <Directory /var/www/%1/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        Order allow,deny
    </Directory>

    WSGIScriptAlias / /var/www/html/web/app.wsgi
    <Directory /var/www/html/web/>
        Order allow,deny
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.