Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following config:

server.modules              = (
  "mod_compress",
  "mod_access",
  "mod_alias",
  "mod_rewrite",
  "mod_redirect",
  "mod_secdownload",
  "mod_h264_streaming",
  "mod_flv_streaming",
  "mod_accesslog",
  "mod_auth",
  "mod_status",
  "mod_expire",
  "mod_fastcgi"
)

[...]

fastcgi.server = ( ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/var/tmp/lighttpd/php-fastcgi.socket" + var.PID,
                     "max-procs" => 1,
                     "kill-signal" => 9,
                     "idle-timeout" => 10,
                     "bin-environment" => (
                       "PHP_FCGI_CHILDREN" => "200",
                       "PHP_FCGI_MAX_REQUESTS" => "1000"
                     ),
                     "/pyapps/essai/blondes.fcgi" => (
                     "main" => (
                        "socket" => "/var/tmp/lighttpd/django-fastcgi.socket",
                      ),
                      ),

                     "bin-copy-environment" => (
                       "PATH", "SHELL", "USER"
                     ),
                     "broken-scriptfilename" => "enable"
                 )))

[...]

$HTTP["host"] =~ "(^|www\.)cam\.com(\:[0-9]*)?$" {

        server.document-root = "/home/cam/web/"
        accesslog.filename = "/home/cam/log/access.log"
        server.errorlog = "/home/cam/log/error.log"
        server.follow-symlink = "enable"

        # files to check for if .../ is requested
        server.indexfiles           = ( "index.php", "index.html", "index.htm", "index.rb")

url.rewrite = (
"^(/blondes/.*)$" => "/pyapps/essai/blondes.fcgi$1"
)

}

I have the following dir tree:

/home/tv/web/
    `-- pyapps
        `-- essai
            `-- __init__.py
            `-- blondes.fcgi
            `-- blondes.pid
            `-- django-fcgi.py
            `-- manage.py
            `-- manage.pyo
            `-- plop
            `-- settings.py
            `-- urls.py

No error when restarting lighthttpd.

The I run:

./manage.py runfcgi method=prefork socket=/var/tmp/lighttpd/django-fastcgi.socket  daemonize=false pidfile=blondes.pid

No errors neither.

I then go to http://cam.com/blondes/.

I offers me to download an empty file.

I checked permissions but everything is set to the same user and group, and they work for the PHP site.

The file /var/tmp/lighttpd/django-fastcgi.socket exists.

When I reload the page, I got no output in error logs, nor in the manage.py runfcgi command.

I probably missed something obvious, but what ?

share|improve this question
    
I feel like it works on the input side, and the django side, but that the information just don't go from lighthttp to django. –  e-satis Jan 3 '11 at 18:05

1 Answer 1

Found it.

fastcgi.server = ( ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/var/tmp/lighttpd/php-fastcgi.socket" + var.PID,
                     "max-procs" => 1,
                     "kill-signal" => 9,
                     "idle-timeout" => 10,
                     "bin-environment" => (
                       "PHP_FCGI_CHILDREN" => "200",
                       "PHP_FCGI_MAX_REQUESTS" => "1000"
                     ),
                     "/pyapps/essai/blondes.fcgi" => (
                     "main" => (
                        "socket" => "/var/tmp/lighttpd/django-fastcgi.socket",
                      ),
                      ),

                     "bin-copy-environment" => (
                       "PATH", "SHELL", "USER"
                     ),
                     "broken-scriptfilename" => "enable"
                 )))

Should be:

fastcgi.server = ( ".php" => ((
                "bin-path" => "/usr/bin/php-cgi",
                 "socket" => "/var/tmp/lighttpd/php-fastcgi.socket" + var.PID,
                 "max-procs" => 1,
                 "kill-signal" => 9,
                 "idle-timeout" => 10,
                 "bin-environment" => (
                   "PHP_FCGI_CHILDREN" => "200",
                   "PHP_FCGI_MAX_REQUESTS" => "1000"
                 ),
                 "bin-copy-environment" => (
                   "PATH", "SHELL", "USER"
                 ),
                 "broken-scriptfilename" => "enable"
             )),
             "/pyapps/essai/blondes.fcgi" => (
                 "main" => (
                    "socket" => "/var/tmp/lighttpd/django-fastcgi.socket",
              ),
              ),
)

Just a stupid syntax error. Lightttpd just don't tell you anything when useless parameters are passed. No error message. Nothing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.