I setup an app via the web interface: mod_wsgi 3.4/Python 2.7. I used this to create a virtualenv and deploy my django app. Its been working fine. However, with a new update, we're trying to use gevent which doesn't seem to work nicely with mod_wsgi. We think it will work correctly under uWSGI. I'm having trouble setting things up under uWSGI. I found these instructions: http://projects.unbit.it/uwsgi/wiki/Example My WSGI file contains this: import os import sys
I tried the change to apache2/conf/http.conf and added this: <location/> SetHandler uwsgi-handler uWSGISocket 127.0.0.1:3031 </location> when I try apache2/bin/restart I get:
One more thing, the last line says "Do not forget to load the uwsgi apache2 module in your apache configuration (normally it will be installed in /usr/lib/apache2)". I assume that will fix my problem, but I don't know how to install/load these module's on webfaction? asked 27 Oct '14, 23:35 rsp |
Have you seen the existing guide to using Nginx + uWSGI + Django? If not, please review this one:
https://community.webfaction.com/questions/10242/installing-nginx-uwsgi
I'm not sure if your priority is to keep Apache or to use uWSGI. It was my understanding that most people that do use uWSGI do so with Nginx instead of Apache.
Thanks. I did see that. I'm going to try it. I'm not too familiar with deployment setups which is one reason I stuck with webfaction's default apache/mod_wsgi. However, I think mod_wsgi is the thing causing the problem with our code so I wanted to see if its easy to just change to uwsgi without making a lot of other changes (like switching to nginx from apache). nginx deployment seems like a bunch of stuff out of my league, but I'll take a look at it, unless there is a simpler solution?
It might be simpler to use uWSGI with apache, but it's not something I have any experience with and it's not something we have a how-to guide for. Given that we have a setup guide for uWSGI on Nginx, and because it's probably going to be easier to obtain support from the uWSGI community when using Nginx, I'd still go that route if it were me. It may be a bigger change, but it's still probably the simpler solution given the tools available.