How to configure fastcgi to work with ligttpd in ubuntuHow to configure fastcgi with lighttpdNginx + PHP-FPM = “Random” 502 Bad GatewayPython CGI on Amazon AWS EC2 micro-instance — a how-to!When restarting ligttpd, how do I get fastcgi php-cgi's to restartWhy the php-cgi wrapper script for php-fpm? (Using virtualhost and suexec.)How to tell: Is it nginx or PHP-cgi which is slower?lighttpd How to allow executing fcgi programs on www folder?FastCGI: “comm with server aborted: read failed” only for one specific fileIncreasing FcgidMaxProcesses does not help to solve “mod_fcgid: can't apply process slot” errorHow to install actual php7's fast-cgi for apache2

The unknown and unexplained in science fiction

What are these pads?

Add elements inside Array conditionally in JavaScript

What is the Ancient One's mistake?

Why are thrust reversers not used down to taxi speeds?

Should one save up to purchase a house/condo or maximize their 401(k) first?

How is Arya still alive?

My perfect evil overlord plan... or is it?

Is there an idiom that means "revealing a secret unintentionally"?

What are my options legally if NYC company is not paying salary?

History: Per Leviticus 19:27 would the apostles have had corner locks ala Hassidim today?

Are wands in any sort of book going to be too much like Harry Potter?

Why is there a cap on 401k contributions?

Names of the Six Tastes

Can you turn a recording upside-down?

Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?

Steganography in Latex

What happens when the drag force exceeds the weight of an object falling into earth?

I'm attempting to understand my 401k match and how much I need to contribute to maximize the match

What should I use to get rid of some kind of weed in my onions

When was it publicly revealed that a KH-11 spy satellite took pictures of the first Shuttle flight?

99 coins into the sacks

Company stopped paying my salary. What are my options?

Crime rates in a post-scarcity economy



How to configure fastcgi to work with ligttpd in ubuntu


How to configure fastcgi with lighttpdNginx + PHP-FPM = “Random” 502 Bad GatewayPython CGI on Amazon AWS EC2 micro-instance — a how-to!When restarting ligttpd, how do I get fastcgi php-cgi's to restartWhy the php-cgi wrapper script for php-fpm? (Using virtualhost and suexec.)How to tell: Is it nginx or PHP-cgi which is slower?lighttpd How to allow executing fcgi programs on www folder?FastCGI: “comm with server aborted: read failed” only for one specific fileIncreasing FcgidMaxProcesses does not help to solve “mod_fcgid: can't apply process slot” errorHow to install actual php7's fast-cgi for apache2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am able to run lighttpd on ubuntu 9.10.



But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file:



#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => "9098",
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
"docroot" => "/" # remote server may use
# it's own docroot
))
)

This is what I get in the error.log in ligttpd:
2010-03-07 21:00:11: (log.c.166) server started
2010-03-07 21:00:11: (mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/cgi-fcgi failed to start:
2010-03-07 21:00:11: (mod_fastcgi.c.1108) child exited with status 1 /usr/local/bin/cgi-fcgi
2010-03-07 21:00:11: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-03-07 21:00:11: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-03-07 21:00:11: (server.c.931) Configuration of plugins failed. Going down.


I do have cgi-fcgi in /usr/local/bin:



$ which cgi-fcgi 
/usr/local/bin/cgi-fcgi


'/usr/local/bin/cgi-fcgi' is the executable after I download and compile fast-cgi.



Here is my lighttpd conf file:



$ more lighttpd.conf
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )

## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root = "/srv/www/htdocs/"

## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ ".pdf$"
server.range-requests = "disable"


##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 9090

## bind to localhost (default: all interfaces)
server.bind = "127.0.0.1"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
#server.pid-file = "/var/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/www/vhosts/"
#simple-vhost.default-host = "www.example.org"
#simple-vhost.document-root = "/htdocs/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/www/errors/status-"

## virtual directory listings
#dir-listing.activate = "enable"
## select encoding for directory listings
#dir-listing.encoding = "utf-8"

## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname = "wwwrun"

#### compress module
#compress.cache-dir = "/var/cache/lighttpd/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => 1026,
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
#"docroot" => "/" # remote server may use
# it's own docroot
))
)
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/var/run/lighttpd/php-fastcgi.s
ocket",
# "bin-path" => "/usr/local/bin/php-cgi"
# )
# )
# )

#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".cgi" => "/usr/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

#### auth module
## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"

#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )

#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www.(.*)"
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"

#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "ac
cess plus 1 seconds 2 minutes")

#### ssi
#ssi.extension = ( ".shtml" )

#### rrdtool
#rrdtool.binary = "/usr/bin/rrdtool"
#rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"

#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1


Thank you for your help.










share|improve this question
























  • What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

    – joschi
    Mar 8 '10 at 7:16


















0















I am able to run lighttpd on ubuntu 9.10.



But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file:



#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => "9098",
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
"docroot" => "/" # remote server may use
# it's own docroot
))
)

This is what I get in the error.log in ligttpd:
2010-03-07 21:00:11: (log.c.166) server started
2010-03-07 21:00:11: (mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/cgi-fcgi failed to start:
2010-03-07 21:00:11: (mod_fastcgi.c.1108) child exited with status 1 /usr/local/bin/cgi-fcgi
2010-03-07 21:00:11: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-03-07 21:00:11: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-03-07 21:00:11: (server.c.931) Configuration of plugins failed. Going down.


I do have cgi-fcgi in /usr/local/bin:



$ which cgi-fcgi 
/usr/local/bin/cgi-fcgi


'/usr/local/bin/cgi-fcgi' is the executable after I download and compile fast-cgi.



Here is my lighttpd conf file:



$ more lighttpd.conf
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )

## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root = "/srv/www/htdocs/"

## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ ".pdf$"
server.range-requests = "disable"


##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 9090

## bind to localhost (default: all interfaces)
server.bind = "127.0.0.1"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
#server.pid-file = "/var/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/www/vhosts/"
#simple-vhost.default-host = "www.example.org"
#simple-vhost.document-root = "/htdocs/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/www/errors/status-"

## virtual directory listings
#dir-listing.activate = "enable"
## select encoding for directory listings
#dir-listing.encoding = "utf-8"

## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname = "wwwrun"

#### compress module
#compress.cache-dir = "/var/cache/lighttpd/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => 1026,
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
#"docroot" => "/" # remote server may use
# it's own docroot
))
)
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/var/run/lighttpd/php-fastcgi.s
ocket",
# "bin-path" => "/usr/local/bin/php-cgi"
# )
# )
# )

#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".cgi" => "/usr/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

#### auth module
## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"

#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )

#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www.(.*)"
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"

#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "ac
cess plus 1 seconds 2 minutes")

#### ssi
#ssi.extension = ( ".shtml" )

#### rrdtool
#rrdtool.binary = "/usr/bin/rrdtool"
#rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"

#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1


Thank you for your help.










share|improve this question
























  • What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

    – joschi
    Mar 8 '10 at 7:16














0












0








0








I am able to run lighttpd on ubuntu 9.10.



But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file:



#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => "9098",
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
"docroot" => "/" # remote server may use
# it's own docroot
))
)

This is what I get in the error.log in ligttpd:
2010-03-07 21:00:11: (log.c.166) server started
2010-03-07 21:00:11: (mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/cgi-fcgi failed to start:
2010-03-07 21:00:11: (mod_fastcgi.c.1108) child exited with status 1 /usr/local/bin/cgi-fcgi
2010-03-07 21:00:11: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-03-07 21:00:11: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-03-07 21:00:11: (server.c.931) Configuration of plugins failed. Going down.


I do have cgi-fcgi in /usr/local/bin:



$ which cgi-fcgi 
/usr/local/bin/cgi-fcgi


'/usr/local/bin/cgi-fcgi' is the executable after I download and compile fast-cgi.



Here is my lighttpd conf file:



$ more lighttpd.conf
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )

## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root = "/srv/www/htdocs/"

## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ ".pdf$"
server.range-requests = "disable"


##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 9090

## bind to localhost (default: all interfaces)
server.bind = "127.0.0.1"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
#server.pid-file = "/var/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/www/vhosts/"
#simple-vhost.default-host = "www.example.org"
#simple-vhost.document-root = "/htdocs/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/www/errors/status-"

## virtual directory listings
#dir-listing.activate = "enable"
## select encoding for directory listings
#dir-listing.encoding = "utf-8"

## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname = "wwwrun"

#### compress module
#compress.cache-dir = "/var/cache/lighttpd/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => 1026,
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
#"docroot" => "/" # remote server may use
# it's own docroot
))
)
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/var/run/lighttpd/php-fastcgi.s
ocket",
# "bin-path" => "/usr/local/bin/php-cgi"
# )
# )
# )

#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".cgi" => "/usr/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

#### auth module
## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"

#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )

#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www.(.*)"
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"

#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "ac
cess plus 1 seconds 2 minutes")

#### ssi
#ssi.extension = ( ".shtml" )

#### rrdtool
#rrdtool.binary = "/usr/bin/rrdtool"
#rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"

#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1


Thank you for your help.










share|improve this question
















I am able to run lighttpd on ubuntu 9.10.



But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file:



#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => "9098",
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
"docroot" => "/" # remote server may use
# it's own docroot
))
)

This is what I get in the error.log in ligttpd:
2010-03-07 21:00:11: (log.c.166) server started
2010-03-07 21:00:11: (mod_fastcgi.c.1104) the fastcgi-backend /usr/local/bin/cgi-fcgi failed to start:
2010-03-07 21:00:11: (mod_fastcgi.c.1108) child exited with status 1 /usr/local/bin/cgi-fcgi
2010-03-07 21:00:11: (mod_fastcgi.c.1111) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2010-03-07 21:00:11: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2010-03-07 21:00:11: (server.c.931) Configuration of plugins failed. Going down.


I do have cgi-fcgi in /usr/local/bin:



$ which cgi-fcgi 
/usr/local/bin/cgi-fcgi


'/usr/local/bin/cgi-fcgi' is the executable after I download and compile fast-cgi.



Here is my lighttpd conf file:



$ more lighttpd.conf
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
"mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )

## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root = "/srv/www/htdocs/"

## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"

# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )

## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X

# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)

# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"


## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"

#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ ".pdf$"
server.range-requests = "disable"


##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
server.port = 9090

## bind to localhost (default: all interfaces)
server.bind = "127.0.0.1"

## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"

## to help the rc.scripts
#server.pid-file = "/var/run/lighttpd.pid"


###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/www/vhosts/"
#simple-vhost.default-host = "www.example.org"
#simple-vhost.document-root = "/htdocs/"


##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/www/errors/status-"

## virtual directory listings
#dir-listing.activate = "enable"
## select encoding for directory listings
#dir-listing.encoding = "utf-8"

## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"

## change uid to <uid> (default: don't care)
#server.username = "wwwrun"

## change uid to <uid> (default: don't care)
#server.groupname = "wwwrun"

#### compress module
#compress.cache-dir = "/var/cache/lighttpd/compress/"
#compress.filetype = ("text/plain", "text/html")

#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )

#### fastcgi module
fastcgi.server = ( "/fastcgi_scripts/" =>
(( "host" => "127.0.0.1",
"port" => 1026,
"check-local" => "disable",
"bin-path" => "/usr/local/bin/cgi-fcgi",
#"docroot" => "/" # remote server may use
# it's own docroot
))
)
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/var/run/lighttpd/php-fastcgi.s
ocket",
# "bin-path" => "/usr/local/bin/php-cgi"
# )
# )
# )

#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".cgi" => "/usr/bin/perl" )
#

#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"

#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"

#### auth module
## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"

#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )

#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www.(.*)"
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"

#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "ac
cess plus 1 seconds 2 minutes")

#### ssi
#ssi.extension = ( ".shtml" )

#### rrdtool
#rrdtool.binary = "/usr/bin/rrdtool"
#rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"

#### setenv
#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
#setenv.add-response-header = ( "X-Secret-Message" => "42" )

## for mod_trigger_b4_dl
# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
# trigger-before-download.trigger-url = "^/trigger/"
# trigger-before-download.download-url = "^/download/"
# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
# trigger-before-download.trigger-timeout = 10

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### include
#include /etc/lighttpd/lighttpd-inc.conf
## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
#include "lighttpd-inc.conf"

#### include_shell
#include_shell "echo var.a=1"
## the above is same as:
#var.a=1


Thank you for your help.







lighttpd fastcgi






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 '10 at 19:45







michael

















asked Mar 8 '10 at 5:09









michaelmichael

8114




8114












  • What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

    – joschi
    Mar 8 '10 at 7:16


















  • What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

    – joschi
    Mar 8 '10 at 7:16

















What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

– joschi
Mar 8 '10 at 7:16






What kind of program or script is /usr/local/bin/cgi-fcgi? What's its output when you run it in an interactive shell? Also post your complete lighttpd configuration.

– joschi
Mar 8 '10 at 7:16











2 Answers
2






active

oldest

votes


















0














I get the same error when I try to use helloweb c application as my sample fast-cgi script binary. The error is due to when lighty starts running the script, it couldn't find the associated shared library libfcgi.so.0.



Once I update my LD_LIBRARY_PATH and ldconfig, sample fcgi-script binary able to locate the library fine.
export LD_LIBRARY_PATH=/usr/local/lib

ldconfig



The error.log doesn't say the library is missing when you invoke lighttpd as service (sudo service lighttpd start).



but if you run lighttpd from it's sources where you can build lighty ( sudo lighttpd -D -f doc/config/mylighttpd.conf) you get the error saying.




/usr/lib/fcgi-bin/helloweb: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory)




hope this helps someone.






share|improve this answer
































    0














    I assume you're starting the server as root. If not can you make sure the user which you use to start the server has access to /usr/local/bin/cgi-fcgi? Also make sure that cgi-fcgi works without error just by executing /usr/local/bin/cgi-fcgi






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "2"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f120233%2fhow-to-configure-fastcgi-to-work-with-ligttpd-in-ubuntu%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I get the same error when I try to use helloweb c application as my sample fast-cgi script binary. The error is due to when lighty starts running the script, it couldn't find the associated shared library libfcgi.so.0.



      Once I update my LD_LIBRARY_PATH and ldconfig, sample fcgi-script binary able to locate the library fine.
      export LD_LIBRARY_PATH=/usr/local/lib

      ldconfig



      The error.log doesn't say the library is missing when you invoke lighttpd as service (sudo service lighttpd start).



      but if you run lighttpd from it's sources where you can build lighty ( sudo lighttpd -D -f doc/config/mylighttpd.conf) you get the error saying.




      /usr/lib/fcgi-bin/helloweb: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory)




      hope this helps someone.






      share|improve this answer





























        0














        I get the same error when I try to use helloweb c application as my sample fast-cgi script binary. The error is due to when lighty starts running the script, it couldn't find the associated shared library libfcgi.so.0.



        Once I update my LD_LIBRARY_PATH and ldconfig, sample fcgi-script binary able to locate the library fine.
        export LD_LIBRARY_PATH=/usr/local/lib

        ldconfig



        The error.log doesn't say the library is missing when you invoke lighttpd as service (sudo service lighttpd start).



        but if you run lighttpd from it's sources where you can build lighty ( sudo lighttpd -D -f doc/config/mylighttpd.conf) you get the error saying.




        /usr/lib/fcgi-bin/helloweb: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory)




        hope this helps someone.






        share|improve this answer



























          0












          0








          0







          I get the same error when I try to use helloweb c application as my sample fast-cgi script binary. The error is due to when lighty starts running the script, it couldn't find the associated shared library libfcgi.so.0.



          Once I update my LD_LIBRARY_PATH and ldconfig, sample fcgi-script binary able to locate the library fine.
          export LD_LIBRARY_PATH=/usr/local/lib

          ldconfig



          The error.log doesn't say the library is missing when you invoke lighttpd as service (sudo service lighttpd start).



          but if you run lighttpd from it's sources where you can build lighty ( sudo lighttpd -D -f doc/config/mylighttpd.conf) you get the error saying.




          /usr/lib/fcgi-bin/helloweb: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory)




          hope this helps someone.






          share|improve this answer















          I get the same error when I try to use helloweb c application as my sample fast-cgi script binary. The error is due to when lighty starts running the script, it couldn't find the associated shared library libfcgi.so.0.



          Once I update my LD_LIBRARY_PATH and ldconfig, sample fcgi-script binary able to locate the library fine.
          export LD_LIBRARY_PATH=/usr/local/lib

          ldconfig



          The error.log doesn't say the library is missing when you invoke lighttpd as service (sudo service lighttpd start).



          but if you run lighttpd from it's sources where you can build lighty ( sudo lighttpd -D -f doc/config/mylighttpd.conf) you get the error saying.




          /usr/lib/fcgi-bin/helloweb: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory)




          hope this helps someone.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 18 '13 at 22:18









          Nathan C

          13.8k33561




          13.8k33561










          answered Jun 18 '13 at 21:06









          visakhvisakh

          1




          1























              0














              I assume you're starting the server as root. If not can you make sure the user which you use to start the server has access to /usr/local/bin/cgi-fcgi? Also make sure that cgi-fcgi works without error just by executing /usr/local/bin/cgi-fcgi






              share|improve this answer



























                0














                I assume you're starting the server as root. If not can you make sure the user which you use to start the server has access to /usr/local/bin/cgi-fcgi? Also make sure that cgi-fcgi works without error just by executing /usr/local/bin/cgi-fcgi






                share|improve this answer

























                  0












                  0








                  0







                  I assume you're starting the server as root. If not can you make sure the user which you use to start the server has access to /usr/local/bin/cgi-fcgi? Also make sure that cgi-fcgi works without error just by executing /usr/local/bin/cgi-fcgi






                  share|improve this answer













                  I assume you're starting the server as root. If not can you make sure the user which you use to start the server has access to /usr/local/bin/cgi-fcgi? Also make sure that cgi-fcgi works without error just by executing /usr/local/bin/cgi-fcgi







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 10 '17 at 3:44









                  KarthikKarthik

                  592




                  592



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Server Fault!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f120233%2fhow-to-configure-fastcgi-to-work-with-ligttpd-in-ubuntu%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                      Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                      Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020