cazz
Posts: 220
Joined: Wed Nov 14, 2012 9:01 pm
Location: Sweden

Get lighthttpd work with CGI

Thu Nov 15, 2012 7:11 pm

Hi I have problem to make lighthttpd works with CGI.

In lighttpd.conf file I have

Code: Select all

server.modules = (
	"mod_access",
	"mod_alias",
	"mod_compress",
 	"mod_redirect",
	"mod_fastcgi",
	"mod_auth",
	"mod_cgi",
#       "mod_rewrite",
)
and

Code: Select all

$HTTP["url"] =~ "/cgi-bin/" {
      cgi.assign = ( ".cgi" => "/usr/lib/cgi-bin/" )
}
I have put a basic CGI file in "usr/lib/cgi-bin" and I have run "sudo chmod +x test.cgi" (the file is name test.cgi)

But it just give me "The webpage cannot be found" when I try http://<ipnumber>/cgi-bin/test.cgi
/Cazz

Return to “Beginners”