[pkg-lighttpd] Bug#483061: lighttpd doesn't like relative docroot

Adrian von Bidder avbidder at fortytwo.ch
Mon May 26 20:21:29 UTC 2008


Package: lighttpd
Version: 1.4.19-4
Severity: normal

Hi,

I like to have a simple lighttpd.conf in web based projects for development, 
so I can just check out my sources and run "lighttpd -D -f 
tools/lighttpd.conf" from the toplevel directory of my project.

This implies using a relative path as docroot.  Which works just fine for 
static content but executing a CGI fails:

+++
server.document-root = "./www"
#server.document-root = "/home/avbidder/p/ikiwiki/www"
server.port = 8888

index-file.names = ("index.html")

include_shell "/usr/share/lighttpd/create-mime.assign.pl"

server.modules = ("mod_cgi")
static-file.exclude-extensions = (".cgi")
$HTTP["url"] =~ "^/ikiwiki.cgi" {
    cgi.assign = ("" => "")
    #cgi.assign = (".cgi" => "")
}
+++

(with log-request-handling enabled, too:)

+++
$ lighttpd -D -f tools/lighttpd.conf
lighttpd: Symbol `FamErrlist' has different size in shared object, consider 
re-linking
2008-05-26 22:17:47: (log.c.75) server started
2008-05-26 22:17:52: (response.c.212) -- splitting Request-URI
2008-05-26 22:17:52: (response.c.213) 
Request-URI  :  /ikiwiki.cgi?page=index&do=edit
2008-05-26 22:17:52: (response.c.214) URI-scheme   :  http
2008-05-26 22:17:52: (response.c.215) URI-authority:  localhost:8888
2008-05-26 22:17:52: (response.c.216) URI-path     :  /ikiwiki.cgi
2008-05-26 22:17:52: (response.c.217) URI-query    :  page=index&do=edit
2008-05-26 22:17:52: (response.c.267) -- sanatising URI
2008-05-26 22:17:52: (response.c.268) URI-path     :  /ikiwiki.cgi
2008-05-26 22:17:52: (response.c.382) -- before doc_root
2008-05-26 22:17:52: (response.c.383) Doc-Root     : ./www
2008-05-26 22:17:52: (response.c.384) Rel-Path     : /ikiwiki.cgi
2008-05-26 22:17:52: (response.c.385) Path         :
2008-05-26 22:17:52: (response.c.433) -- after doc_root
2008-05-26 22:17:52: (response.c.434) Doc-Root     : ./www
2008-05-26 22:17:52: (response.c.435) Rel-Path     : /ikiwiki.cgi
2008-05-26 22:17:52: (response.c.436) Path         : ./www/ikiwiki.cgi
2008-05-26 22:17:52: (response.c.453) -- logical -> physical
2008-05-26 22:17:52: (response.c.454) Doc-Root     : ./www
2008-05-26 22:17:52: (response.c.455) Rel-Path     : /ikiwiki.cgi
2008-05-26 22:17:52: (response.c.456) Path         : ./www/ikiwiki.cgi
2008-05-26 22:17:52: (response.c.473) -- handling physical path
2008-05-26 22:17:52: (response.c.474) Path         : ./www/ikiwiki.cgi
2008-05-26 22:17:52: (response.c.481) -- file found
2008-05-26 22:17:52: (response.c.482) Path         : ./www/ikiwiki.cgi
2008-05-26 22:17:52: (response.c.631) -- handling subrequest
2008-05-26 22:17:52: (response.c.632) Path         : ./www/ikiwiki.cgi
2008-05-26 22:17:52: (mod_cgi.c.998) CGI failed: No such file or 
directory ./www/ikiwiki.cgi
mod_cgi.c.1001: aborted
+++

Whereas just changing docroot to an absolute path in the above config 
suffices to get the cgi running just fine.  But then I'll have to adjust my 
lighttpd.conf for every host I'm working on.  This is a real pity because I 
like having my projects ready to hack, with as little setup time as I 
like... :-)

cheers
-- vbi


-- 
OpenPGP encrypted mail welcome - my key: http://fortytwo.ch/gpg/92082481
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 388 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-lighttpd-maintainers/attachments/20080526/6c1455d1/attachment.pgp 


More information about the pkg-lighttpd-maintainers mailing list