On Sun, Apr 6, 2008 at 6:53 PM, skunkwerk <[EMAIL PROTECTED]> wrote:
>
>  I'm having trouble running django with lighttpd (I'm not on a shared
>  host).  Here is what I've installed:
>
>  ubuntu 7.10
>  lighttpd
>  flup
>  cmemcache
>  python
>
>  When I go to my web address which maps to the django project
>  directory, all I see is a directory listing, not any django pages.
>
>  I started fcgi like this, as in the docs:
>  ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033
>
>  have this in my lighttpd.conf:
>  server.modules              = (
>             "mod_access",
>             "mod_alias",
>             "mod_accesslog",
>             "mod_compress",
>             "mod_fastcgi",
>   )
>
>  fastcgi.server = (
>     "/mnt/project/mysite.fcgi" => (
>         "main" => (
>             "host" => "127.0.0.1",
>             "port" => 3033,
>             "check-local" => "disable",
>         )
>     ),
>  )
>
>  and the mysite.fcgi file:

Why did you create the .fcgi file? As the documentation says, that file needs
to be created if you are using FastCGI through Apache and you are using
lighttpd.

What you are missing (and that's also something that is documented) is the
url.rewrite-once directive in your lighttpd configuration.

The pipeline when using lighttpd + fastcgi + apache is:

1. HTTP Request arrives to lighttpd
2. lighttpd uses the::

        "^(/.*)$" => "/mysite.fcgi$1"

   entry in the url.rewrite-once directive to route that request to the
   mysite.fcgi location. Note mysite.fcgi file itself doesn't need to exist
   it's just a ghost placeholder for the request routing. That's because of
   the::

     fastcgi.server."/mysite.fcgi"."main"."check-local" => "disable"

   setting.

   (note also thaat you need to correct that "/mnt/project/mysite.fcgi"
   entry because it doesn't match "/mysite.fcgi$1". they should.

3. lighttpd's mod_fastcgi module gets the request and routes it via a TCP or
   Unix socket to thegastCGi server

4. The fastCGI server (in your case Django's manage.py runfastcgi + flup) gets
   the request

Regards,

--
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to