I found a small and nice web server called cherokee which supporst fast-cgi and scgi and I'm trying to run django on it. Server page: http://www.0x50.org/
############## SCGI is working -------------------------- 1. get djang-scgi.py from here: https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/file/stuff/trunk/bin/django-scgi.py 2. put it in a folder where you keep your project ---------- Example /var/www /var/www/djn <- a django project, put djang-scgi.py in it ---------- 3. run: python django-scgi.py --projects=/var/www/ --settings=djn.settings --host=localhost --port=8080 where djn.settins are the project settings (projectname.settings) 4. edit cherokee.conf and add: --------------------------- Directory / { Handler scgi { Server localhost:8080 } } --------------------------- Where localhost and 8080 is host/port of the running django scgi. 5. start cherokee. It should work. The urls should be the same like http://localhost/page should work also on cherkokee :) I need to play with it. More on scgi here: http://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoScgi ########################################## ########################################## Fast-CGI - problems here 1. I've added to cherokee.conf: ------------------------- Directory / { Handler fcgi { Server localhost:8080 } } ------------------------- 2. from a django project I've run: python manage.py runfcgi method=threaded host=localhost port=8080 3. I've started cherokee. When I go to http://localhost/test (I have a working view on /test) i get a big error. >From terminal: -------------------------------------------- handler_fcgi.c:118: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/fcgi_base.py", line 1111, in handler result = self.application(environ, start_response) File "/home/piotr/nowe/python/django_src/django/core/handlers/wsgi.py", line 146, in __call__ response = self.get_response(request.path, request) File "/home/piotr/nowe/python/django_src/django/core/handlers/base.py", line 59, in get_response response = middleware_method(request) File "/home/piotr/nowe/python/django_src/django/middleware/common.py", line 40, in process_request if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not in old_url[1].split('/')[-1]): IndexError: string index out of range ---------------------------------------------- and in the browse flup shows a simillar bigger... What am I doing wrong? :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---

