請問一下版友,目前我在raspberry pi上設定cgi會出現500error訊息
以上提供我設定的內容,可以幫我看哪裡有錯嗎?我是安裝lighttpd
#這是我的測試程式我有設定chmod 755'放在/var/www/cgi-bin下檔名是index.py
--------------------
#!/usr/lib/python2.7
print "Content-type:text/html\r\n\r\n"
print '<html>'
print '<head>'
print '<title>Hello Word - First CGI Program</title>'
print '</head>'
print '<body>'
print '<h2>Hello Word! This is my first CGI program</h2>'
print '</body>'
print '</html>'
---------------------------
以下是lighttpd.conf的設定
--------------------------------------
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_cgi",
"mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
index-file.names = ( "index.php", "index.html", "index.lighttpd.html", "index.py" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi",".py" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# 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"
cgi.assign = ( ".py" => "/usr/lib/python2.7" )
--------------------------------------------------------
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.224.211.114
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1436336999.A.0CF.html
→
07/08 17:07, , 1F
07/08 17:07, 1F
→
07/09 13:03, , 2F
07/09 13:03, 2F
→
07/09 13:03, , 3F
07/09 13:03, 3F
→
07/11 14:01, , 4F
07/11 14:01, 4F
→
07/11 18:55, , 5F
07/11 18:55, 5F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章