Lighttpd (Port 80)

インストール

# apt install lighttpd

# apt install php5-cgi

ディフォールトのページ

/var/www/html/index.lighttpd.html

PHPの設定
# lighty-enable-mod fastcgi

# lighty-enable-mod fastcgi-php

# /etc/init.d/lighttpd force-reload

Pythonの設定
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_cgi",
)

$HTTP["url"] =~ "^/cgi-bin/" {
        cgi.assign = ( ".py" => "/usr/bin/python" )
}
再起動
# systemctl stop lighttpd
# systemctl start lighttpd

ログの出力場所
Lighttpd+PHP

How to get Python to work with Lighttpd?


Return

Dec/30/2017 AM 08:15