Gentoo Forums
Gentoo Forums
Quick Search: in
lighttpd + cgi problem[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sobers_2002
Veteran
Veteran


Joined: 16 Mar 2004
Posts: 1128

PostPosted: Thu Apr 20, 2006 5:56 am    Post subject: lighttpd + cgi problem[SOLVED] Reply with quote

Hi

I am getting a 403 forbidden page with lighttpd if I access any cgi file. I put a sample file like this
Code:
#!/usr/bin/perl
#
print "Content-type: text/html\n\n";
print "<html><head><title>A test cgi</title></head>\n";
print "<body><h1 align=\"center\">A test cgi</h1>\n";
print "<h2>This is a test page to see if lighthttpd does CGIok</h2>\n";
print "</body></html>\n";

exit;

and tried to access it. So what's wrong?? In my lighttpd.conf
Code:
include "mod_cgi.conf"

This has been uncommented and the mod_cgi.conf is as follows :
Code:
###############################################################################
# mod_cgi.conf
# include'd by lighttpd.conf.
# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_cgi.conf,v 1.1 2005/08/27 12:36:13 ka0ttic Exp $
###############################################################################

#
# see cgi.txt for more information on using mod_cgi
#

server.modules += ("mod_cgi")

# NOTE: this requires mod_alias
alias.url = (
     "/cgi-bin/"            =>      var.basedir + "/cgi-bin/"
)

#
# Note that you'll also want to enable the
# cgi-bin alias via mod_alias (above).
#

$HTTP["url"] =~ "^/cgi-bin/" {
    # disable directory listings
    dir-listing.activate = "disable"
    # only allow cgi's in this directory
    cgi.assign = (
                ".pl"   =>      "/usr/bin/perl",
                ".cgi"  =>      "/usr/bin/perl"
        )
}

# vim: set ft=conf foldmethod=marker et :


So wherez the problem???

thanks
Saurabh


EDIT: Got it solved, just removed the assignment to .cgi's for this particular installation as this was conflicting with the assignments in the scripts, #!/usr/bin/perl -wT
_________________
Pdict - dockable dictionary client for linux
FREE97WIN: Use this code on Dreamhost and you get $97 off !!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum