5 ms·
modwsgi: Python WSGI adapter module for Apache
- mattj 17y agoI've used this before, and I highly recommend using fcgi instead. Modwsgi (at least when I tried it) was less stable and not as performant.
- jacquesm 17y agoUse this instead of 'mod_python', especially if you're going to use Django.
- fefzero 17y agoWhy should I use it (I'm especially interested in the Django case)?
- jacquesm 17y agoBecause it is now the preferred way of hooking up python to apache according to the Django docs, let me look it up for you.... edit: from: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/ http://docs.djangoproject.com/en/dev/howto/deployment/modpyt... "The mod_python module for Apache can be used to deploy Django to a production server, although it has been mostly superseded by the simpler mod_wsgi deployment option." which points you to: http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi http://code.djangoproject.com/wiki/django_apache_and_mod_wsg...
- olefoo 17y ago1. the primary maintainer of mod_wsgi is the primary maintainer of mod_python and his focus is on wsgi 2. WSGI is a standard interface defined for python programs in PEP 333 so you should in theory be able to run your program against the builtin wsgi server that ships in the standard library and get the same results as you would running it on any of the webservers that support the WSGI protocol
- benatkin 17y ago3. With mod_wsgi, you can easily restart a django app without restarting apache, by touching the wsgi file.
- jacquesm 17y agotouching the settings file works as well, and almost all of the regular pages will be reloaded as well as soon as you've saved them. Rarely do you have to do anything other then just saving the file.
- deleted 17y ago[deleted]
- piramida 17y agoIt's faster and more robust. We switched to it on production and don't regret in a slightest.
- whalesalad 17y agoWe're using this with apache on schoolrack.com. A couple of application servers running mod_wsgi behind HAProxy and Nginx. Works like a dream. Our site is pretty snappy =) This is fairly common knowledge but if you use Apache with Keep-alive off and serve all your static content with something else (such as Nginx in our case), and only use Apache for dynamic requests it isn't such a dog. I'm not a computer scientist and haven't really bothered to get real solid statistics and reasons behind why mod_wsgi outperforms mod_python, but right off the bat you'll notice it uses significantly less memory. I'm also experimenting with straight up nginx -> fastcgi for a few other projects but am not using it in production for no reason other than Apache + mod_wsgi has proven itself to be reliable and fast as hell.
- dryicerx 17y agoI've been using it for the past couple of months and absolutely love it. It's fast, a lot less memory usage, and a lot stable.
- TimothyFitz 17y agoAnd remember kids: WSGI rhymes with Whiskey.
- Raphael 17y agoThat is so SCSI!
- suhail 17y ago<3 nginx + fastcgi
- truebosko 17y agoPersonally, I've had some issues with fastcgi (for PHP) when you get a lot of simultaneous requests. It would hang, and eventually lock up with no exit except a killing of processes. Not sure if it's just my setup, or the software, or what have you but that's my experience so far. Needing to make some time to try PHP-FPM and see how that works out.
- jokull 17y agoAt one point we did a lot of testing with different Django deployment setups. We ended up using mod_wsgi. It was fast and stable. It would be sweet if you could point it at your virtualenv in a configuration parameter (to make it use your project specific Python binary and site-packages).
- roam 17y agoHere you go then: http://code.google.com/p/modwsgi/wiki/VirtualEnvironments http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
- inklesspen 17y agoI'm actually a fan of reverse-proxying to a production-ready appserver like paste.httpserver.