a per vhosts bin-cgi directory
Added by BKiepke over 11 years ago
Hi,
I use debian 6.0.8 with lighttpd 1.4.28. As I want to build some web-based application on an embedded systems I want to migrate from apache2 to lighttpd.
I managed to get started with simple-vhost. I enabled simple-vhost and cgi mods. My config for simple-vhost looks like
simple-vhost.server-root = "/var/www/" simple-vhost.document-root = "htdocs" $HTTP["host"] =~ "^factory$" { server.document-root = simple-vhost.server-root + "factory/htdocs/" $HTTP["url"] =~ "/cgi-bin/" { cgi.assign = ( "" => simple-vhost.server-root + "factory/cgi-bin/" ) } }
which works as I would expect. So when I enter the url on my development host like http://factory/index.xhtml I get the site I expected.
My Problem is: How do I configure a per vhost cgi-bin-directory like I already have with an apache2 conf?
The expected directory tree should look like this:
/var/www/factory/htdocs <- where all the site documents are stored (.xhtml, .js)
/var/www/factory/cgi-bin <- where all the cgi binarys are stored
I always get an 404 when I try to call a cgi.
Thanks for help
Benny
Replies (1)
RE: a per vhosts bin-cgi directory - Added by szogunek over 11 years ago
use alias.url instead of cgi.assign it works on my machine
$HTTP["host"] =~ "^\.eu" {
alias.url = ("/cgi-bin/" => "/var/www/%1/cgi-bin/")
}
$HTTP["host"] =~ "^\.com" {
alias.url = ("/cgi-bin/" => "/var/www/cgi-bin/")
}