[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#907825: marked as done (lighttpd : scripts in /cgi-bin are not executed, Error 404)



Your message dated Wed, 12 Dec 2018 23:44:42 -0500
with message-id <20181213044442.GC8691@i5.lan>
and subject line 907825-done
has caused the Debian Bug report #907825,
regarding lighttpd : scripts in /cgi-bin are not executed, Error 404
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
907825: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907825
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package:lighttpd
Version:stable,now 1.4.45-1 amd64 [installed]

OS : Debian GNU/Linux 9.5 (stretch)

I have installed lighttpd, if i do : http://<server-ip>/index.html it is working as expected.
Then i have enabled CGI : sudo lighttpd-enable-mod cgi
i have place a simple "hello.py" (chmod +x) in /usr/lib/cgi-bin
http://<server-ip>/cgi-bin/hello.py gives a 404 Error

i have edit the "/etc/lighttpd/conf-enabled/10-cgi.conf" file :

# /usr/share/doc/lighttpd/cgi.txt

server.modules += ( "mod_cgi" )

$HTTP["url"] =~ "^/cgi-bin/" {
        alias.url += ( "/cgi-bin/" => "/var/www/cgi-bin" )
        cgi.assign = (
                ".py"  => "/usr/bin/python",
        )
}

i have make a directory "cgi-bin" in /var/www and place the hello.py there
http://<server-ip>/cgi-bin/hello.py gives Error 404

Really frustrating, im out of ideas how to solve this. 

--
           \\\// 
          -(o o)- 
 ======oOO==(_)==OOo======
     Andrzej Więckowski

--- End Message ---
--- Begin Message ---
Package: lighttpd
Version: lighttpd/1.4.45-1

user error

Use:
alias.url += ( "/cgi-bin/" => "/var/www/cgi-bin/" )

Note the trailing slashes on both pieces of the alias.

/var/www/cgi-binhello.py is unlikely to exist, resulting
in 404 Not Found, whereas /var/www/cgi-bin/hello.py exists.

--- End Message ---

Reply to: