Using mod_wsgi-express for the first time. I intend to use this as a 
solution to the problem of having two django apps running on different 
versions of python (from their respective virtualenvs) on the same box. 
After a little trial and error I have successfully started the server. But 
I have a conf file for one of my applications that specifies several 
directives that don't seem to be covered in the documentation on 
mod_wsgi-express. I'm not sure how to direct mod_wsgi-express to respect 
those directives.

For instance, in my conf file, apache is directed not to cache my appcache 
manifest. Also there are a couple of URL rewrites, etc. (see attached 
snippet of conf file)

I tried just using:

./db/manage.py runmodwsgi --document-root ./htdocs

Which loaded up the site that uses Python 3.4 without breaking my other 
site which uses Python 2.7. But it loads at a snails pace. To the point 
that the loading of one of my js files times out. I'm almost there. I 
suspect it has something to do with the directives in the VirtualHost 
configuration not being set up properly.

How is the best way to go about replicating the setup below using 
mod_wsgi-express?

<VirtualHost *:8000>
    ServerName example.com
    ServerAlias cp.example.com
    DocumentRoot /var/www/cp.example.com/htdocs/

    <Directory /var/www/cp.example.com/htdocs/>
        AllowOverride all
        Options FollowSymLinks Multiviews 
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /var/www/cp.example.com/media/>
        AllowOverride all
        Options FollowSymLinks Multiviews 
        Order allow,deny
        Allow from all
    </Directory>

    Alias /static      /var/www/cp.example.com/htdocs/static
    Alias /css         /var/www/cp.example.com/htdocs/css
    Alias /js          /var/www/cp.example.com/htdocs/js
    Alias /images      /var/www/cp.example.com/htdocs/images
    Alias /media       /var/www/cp.example.com/media/
    Alias /species.appcache /var/www/cp.example.com/htdocs/species.appcache
    Alias /favicon.ico /var/www/cp.example.com/htdocs/favicon.ico
    Alias /robots.txt /var/www/cp.example.com/htdocs/robots.txt

    # Uncomment the following line to use a static front page
    # AliasMatch ^/$ /var/www/cp.example.com/htdocs/index.html

    RewriteEngine On
    RewriteCond /var/www/cp.example.com%{REQUEST_FILENAME} !-f
    RewriteCond /var/www/cp.example.com/media/$2 -f
    RewriteRule ^/media/([^\/]+)/(.+) /generate/$1/$2 [PT]

    # WSGIDaemonProcess species display-name=%{GROUP} 
python-path=/var/www/cp.example.com/db:/home/ubuntu/.virtualenvs/cpdata/lib/python3.4/site-packages
    # WSGIProcessGroup species
    # WSGIApplicationGroup %{GLOBAL}
    # WSGIScriptAlias / /var/www/cp.example.com/db/species/wsgi.py
    

    <Directory /var/www/cp.example.com/db/species>
        <Files wsgi.py>
            Order allow,deny
            Allow from all
        </Files>
    </Directory>

    AddType text/cache-manifest .manifest

    # Don't cache the appcache!
    ExpiresActive on
    ExpiresByType text/cache-manifest "access plus 0 seconds"


</VirtualHost>



-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to