「lighttpd」預設是關掉用 perl 寫的 cgi 動態網頁,不過要讓他跑起來很簡單,只要打開 /etc/lighttpd.conf (如果你的 lighttpd 有安裝在自訂目錄,就不是這邊指的 /etc 下),做兩個步驟的設定就可以了。
先將 server.modules 裡面的 mod_cgi 註解拿掉
server.modules = (
"mod_rewrite",
# "mod_redirect",
"mod_cgi",
...
}
最後找到 cgi.assign,把這個部分的註解也拿掉
cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
然後存檔,restart lighttpd, 這樣你的 lighttpd 就可以跑 perl 寫的網頁了。
沒有留言:
張貼留言