Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.


Członek DUG



Mam problem z wyświetlaniem skryptów perl i pythona na Rasbianie. Cały czas mam 404 not found. Piszą ludzie o tym problemie ale w 2008/2009 roku.
Mój lighttpd.conf to:
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
server.bind = "192.168.20.105"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
dir-listing.activate = "enable"
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"i 10-cgi.conf
# /usr/share/doc/lighttpd/cgi.txt
server.modules += ( "mod_cgi" )
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( ".pl" => "/usr/bin/perl", ".py" => "/usr/bin/python" )
}
## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.py even outside of /usr/lib/cgi-bin.
#
#cgi.assign = (
# ".pl" => "/usr/bin/perl",
# ".py" => "/usr/bin/python",
#)Offline







Podobno człowiek...;)








A gdzie masz folder cgi-bin/ ze skryptami?
Bo ja mam:
ls /var/www/localhost/ cgi-bin htdocs
Tu masz domyślny konfig z Gentoo, działa od kopa:
cat /etc/lighttpd/mod_cgi.conf
###############################################################################
# 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/" {
dir-listing.activate = "disable"
cgi.assign = (
".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl"
)
}
# vim: set ft=conf foldmethod=marker et :Jest tylko pytanie, gdzie masz skrypty, domyślnie w Debianie siedzą w /usr/lib/cgi-bin.
Dlatego radziłbym zmienić
alias.url += (
"/cgi-bin/" => var.basedir + "/cgi-bin/"
)na
alias.url = ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
Powinno pomóc.
czy Ty słuchasz co się do ciebie pisze?
Nie słyszę, co piszesz.... :D
Pozdro
;-)
Ostatnio edytowany przez Jacekalex (2014-04-30 15:00:32)
Offline