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"
                    )),
    )












  • 相关阅读:
    Flutter图片选择 image_picker(官方)插件使用详解
    androidstudo如何跨越这个厚厚的墙,亲测有效 Could not resolve com.android.tools.build:gradle:
    qwq。。胡诌qwq
    关于很狗的军训qwq
    Leetcode每日一题 503.下一个更大元素II
    C++ 关于volatlie
    C++虚成员函数与动态联编
    graphics pipeline
    pointer or function
    线段树
  • 原文地址:https://www.cnblogs.com/andyjia/p/4978164.html
Copyright © 2011-2022 走看看