Django and FastCGISometimes it's not possible to use Django's prefered setup (Apache & mod_python) for production servers. Either mod_python is not available, or you need some stuff which is not possible with it, so do I. I needed to access some environment variables, but mod_python removes most. So why not use FastCGI? FastCGI is a language independent open extension to CGI that provides high performance. So what do I need?
start: django-fcgi.py --settings=myproject.settings --host 127.0.0.1 --port 8882 --daemon
stop: kill `ps auxww | grep [d]jango-fcgi | awk '{print $2}'`
Now you need to configure Apache.
FastCgiExternalServer /var/www/localhost/htdocs/django.fcgi -host 127.0.0.1:8882 # in httpd.conf # and in virt host config.. RewriteEngine On RewriteRule ^(/myapp.*)$ /django.fcgi$1 [L]Finally give Apache a restart and your done! :-) 15. Juni, 2006
Kommentar hinzufügen |
Tag CloudCoding Django Eclipse Frauen Fun Google JSON Java Linux Mail NetBSD OS X Postfix Python SQLite SSH Unix WindowsKategorienArchiv
Links![]()
|
||
|
Social Bookmarking Copyright © 2006 treibsand.com. All Rights Reserved |
|||