ich Setup OpenWrt/Lighttpd mit Lighttpd-Mod-CGI auf 3020 nach Dokumentation. Wenn ich jedoch eine Verbindung zum Router herstelle und die URL des test.sh-Skripts vom Browser aus öffne, wird nur eine weiße Seite angezeigt. Karo lighttpd Fehlerprotokoll diese zu finden:Openwrt/Lighttpd Aufräumen CGI: Prozess starb mit Signal 6
(mod_cgi.c.1313) Säuberung CGI: Prozess mit Signal gestorben 6
test.sh:
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo 'Hello World'
lighttpd. conf:
server.modules = ("mod_cgi")
server.errorlog = "/var/logs/lighttpd/error.log"
index-file.names = ("index.php", "index.html",
"index.htm", "default.htm")
# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar"
)
static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".sh")
dir-listing.activate = "enable"
cgi.assign = (".sh" => "")
Irgendwelche Hilfe? TIA.
ps: Ja, das Skript ist ausführbar.
Ist es vom 'lighttpd' Benutzer ausführbar? Überprüfen Sie, welcher Benutzer 'lighttpd' ausführt, und melden Sie sich dann als dieser Benutzer an und versuchen Sie, das Skript auszuführen - nur mit'./Test.sh'. –
das Ändern von cgi.assign = (".sh" => "") zu cgi.assign = (".sh" => "/ bin/sh") hat funktioniert! – tass