HI,
Does anyone have recent experience of setting of a Django site with
FastCGI and Lighttpd?
We have a new dedicated server and have been trying to set this up
without succcess.
Software:
Lighttpd 1.4.18
Flup 0.5
Django 0.97 pre-SVN (ie: current SVN trunk)
Excerpt from Lighttpd config:
----------------------
fastcgi.debug = 1
fastcgi.server = (
"/mysite_project.fcgi" => (
"main" => (
# Use host / port instead of socket for TCP fastcgi
"bin-path" => "/home/myuser/mysite_project/www/mysite.fcgi",
"host" => "127.0.0.1",
"port" => 3303,
#"socket" => "/home/myuser/mysite_project/www/mysite.sock",
"check-local" => "disable",
"min-procs" => 2,
"max-procs" => 4,
)
),
)
alias.url = (
"/media/" => "/usr/local/django/contrib/admin/media/",
)
url.rewrite-once = (
# "^(/media.*)$" => "$1",
# "^/favicon\.ico$" => "/media/favicon.ico",
"^(/.*)$" => "/mysite_project.fcgi$1",
)
------------------
mysite.fcgi file looks like this:
------
#!/usr/bin/python2.4
import sys, os
# Add a custom Python path.
sys.path.insert(0, "/home/myuser_stage/mysite_project")
# Switch to the directory of your project. (Optional.)
os.chdir("/home/myuser_stage/mysite_project/")
# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "mysite_project.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded")
--
When we start lighttd, it spawns 4 fastcgi processes, but on visiting
the site url we just see:
---
Unhandled Exception
An unhandled exception was thrown by the application.
--
We've verified that Django is properly installed by testing it with
its built in webserver - which works fine.
What are we doing wrong?
help!!
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---