Hey guys, I can't figure this out, when I add the fastcgi module to lighttpd when I try to connect to a php page, I get a segmentation fault error. Nothing is in the error log, and nothing else is printed on the crash.
It seems to only be a problem with php pages; if I connect to an html page, while the fastcgi module is on, the server doesn't crash.
Also, I get a Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.
when I connect to a php page.
The conf files.
lighttpd.conf
var.log_root = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir = "/var/run"
var.home_dir = "/var/lib/lighttpd"
var.conf_dir = "/etc/lighttpd"
var.vhosts_dir = server_root + "/vhosts"
var.cache_dir = "/var/cache/lighttpd"
var.socket_dir = home_dir + "/sockets"
include "modules.conf"
server.port = 80
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = state_dir + "/lighttpd.pid"
server.errorlog = log_root + "/error.log"
include "conf.d/access_log.conf"
include "conf.d/debug.conf"
server.event-handler = "poll"
server.network-backend = "linux-sendfile"
server.max-fds = 2048
server.stat-cache-engine = "simple"
server.max-connections = 150
index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
url.access-deny = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
include "conf.d/mime.conf"
include "conf.d/dirlisting.conf"
server.follow-symlink = "enable"
server.upload-dirs = ( "/var/tmp" )
modules.conf
server.modules = (
"mod_access",
#"mod_fastcgi" #Not needed, referenced in /conf.d/fastcgi.conf
)
include "conf.d/fastcgi.conf"
conf.d/fastcgi.conf
server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php-fastcgi.socket"
))
)
Thanks,
Max
Best Answer
Based on your comments, you have probably ended up mixing the mod_fastcgi.so from your custom install with the lighttpd version installed from the repository. Since the versions don't match, it crashes when you attempt to use it. Ideally, you'd uninstall the previous lighttpd attempt completely, but for now, run
find / -name mod_fastcgi.so
and remove everything it finds. Then, reinstall thelighttpd-fastcgi
package to install the files that really should be there, with the correct version.