• redhat 6.5 lighttpd web.py


    1. 进入lighttpd要放置的文件夹
    cd /usr/local

    2. 安装lighttpd
    wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.37.tar.gz
    tar -zxvf lighttpd-1.4.37
    ./configure --prefix /usr/local/lighttpd
    make & make install

    3. 建立启动项
    cd lighttpd-1.4.37
    cp doc/initscripts/rc.lighttpd.redhat /etc/init.d/lighttpd
    vi /etc/init.d/lighttpd
    lighttpd="/usr/local/lighttpd/sbin/lighttpd"
    chmod a+rx /etc/init.d/lighttpd

    4. 复制配置文件到/etc/lighttpd
    mkdir /etc/lighttpd
    cp -R doc/config/conf.d/ /etc/lighttpd/conf.d/
    cp -R doc/config/vhosts.d/ /etc/lighttpd/vhosts.d/
    cp doc/config/*.conf /etc/lighttpd/

    5. 根据lighttpd.conf的设定,可自定义,建立lighttpd帐户和组
    useradd lighttpd 命令省略

    6. 修改modules.conf
    server.modules = (
    "mod_access",
    "mod_fastcgi",
    "mod_rewrite",
    "mod_accesslog",
    )
    server.document-root = "/srv/www/htdocs"
    server.pid-file = "/opt/test/lighttpd.pid"

    7. 修改conf.d/fastcgi
    fastcgi.server = (
            ".py" => ((
                    "socket"    => "/tmp/fastcgi.python.socket",
                    "bin-path"  => "/srv/www/htdocs/test.py",
                    "max-procs" => 1,
                    "bin-environment" => (
                            "REAL_SCRIPT_NAME" => ""
                    ),
                    "check-local" => "disable"
                    )),
    )












  • 相关阅读:
    BZOJ1930 [Shoi2003]pacman 吃豆豆
    hdu5322 Hope
    hdu5390 tree
    hdu4609 3-idiots
    hdu5354 Bipartite Graph
    hdu4918 Query on the subtree
    hdu5314 Happy King
    [题解] PowerOJ 1741 最长递增子序列问题 (最大流)
    [题解] PowerOJ 1740 圆桌问题 (最大流)
    [题解] PowerOJ 1739 魔术球问题 (最大流)
  • 原文地址:https://www.cnblogs.com/andyjia/p/4978164.html
Copyright © 2020-2023  润新知