connecting to redis from wsgi application

Posted by W_P on Server Fault See other posts from Server Fault or by W_P
Published on 2011-03-14T23:30:46Z Indexed on 2011/03/15 0:11 UTC
Read the original article Hit count: 643

Filed under:
|
|
|

I am running redis and httpd with mod_wsgi on the same server. I have a wsgi application using a virtualenv and the follow virtualhost conf:

WSGIPythonPath /var/www/wsgi
<VirtualHost *:80>
    ServerName test.example.com
    DocumentRoot /var/www/html
    WSGIScriptAlias / /var/www/wsgi/myapp/app.wsgi
    CustomLog logs/test.example.com-access-log common
    ErrorLog logs/test.example.com-error-log
    <Directory /var/www/wsgi/myapp>
        Order allow,deny
        Allow from all
       WSGIScriptReloading On
    </Directory>
</VirtualHost>

I have a sites.pth in my /var/www/wsgi directory, adding myapp to the PYTHONPATH, and this is my /var/www/wsgi/myapp/app.wsgi:

activate_this = '/var/www/envs/myapp/bin/activate_this.py'
execfile( activate_this, dict(__file__=activate_this) )
from myapp.application import app as application

Sorry, I am trying to edit the question to have the rest of my info by it keeps timing out before the edits go through

© Server Fault or respective owner

Related posts about python

Related posts about httpd