Why is lighttpd and fastcgi keeping sending me the *.scgi file instead of the website content?
- by e-satis
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 ?