zoukankan      html  css  js  c++  java
  • 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"
                    )),
    )












  • 相关阅读:
    求原根
    koa2-router中间件来请求数据获取
    koa2 快速开始
    如何修改host
    bzoj 2480——扩展BSGS
    bzoj 4128: Matrix ——BSGS&&矩阵快速幂&&哈希
    Ubuntu 16.04LTS 安装和配置Bochs
    2019ICPC徐州网络赛 A.Who is better?——斐波那契博弈&&扩展中国剩余定理
    求十亿内所有质数的和
    MYSQL的随机查询的实现方法
  • 原文地址:https://www.cnblogs.com/andyjia/p/4978164.html
Copyright © 2011-2022 走看看