下载配置lighttpd

简介:
  1. 创建开发子目录 dev/,下载 Lighttpd 源代码并解压到其下,最新 Lighttpd 稳定版代码为 lighttpd-1.4.19
    $ mkdir dev
    $ cd dev
    $ wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.bz2
    $ tar xjf lighttpd-1.4.19.tar.bz2
    $ cd lighttpd-1.4.19 
    
  2. 安装必要的开发包:
    $ ports/bzip2-devel
    
  3. 编译安装(如果没有设置sudo,需要su为root用户):
    $ ./configure
    $ make
    $ sudo make install
    
    安装完成后 lighttpd 就被安装到了 /usr/local/sbin/lighttpd 这个位置上。
  4. 新建 lighttpd 配置文件 /usr/local/etc/lighttpd.conf (路径随意,lighttpd 启动时指定正确的配置文件路径即可),内容如下:
    server.document-root = "/home/share/htdocs/lighttpd"
    server.port = 7500
    server.username= "nobody"
    server.groupname = "nobody"
    server.modules = ( "mod_access", "mod_accesslog" )
    
    # performance settings
    server.max-worker = 8
    server.max-fds = 2048
    server.max-connections = 1024
    # no keep-alive permitted
    server.max-keep-alive-requests=0
    
    # specify possible index files for root directory
    index-file.names = ( "index.html", "index.htm" )
    
    # mimetype mapping
    mimetype.assign = (
        ".html"         =>      "text/html",
        ".htm"          =>      "text/html",
        # default mime type
        ""              =>      "application/octet-stream",
    )
    
    # error log file path
    server.errorlog = "/tmp/error"
    
    # access log file path
    accesslog.filename = "/tmp/access"
    
    # WebDAV options
    webdav.activate = "enable"
    webdav.is-readonly = "disable"
    
  5. 启动 lighttpd:
    $ sudo /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf
    
目录
相关文章
|
应用服务中间件 nginx
|
关系型数据库 应用服务中间件 Linux
|
应用服务中间件 Apache nginx
|
应用服务中间件 nginx
|
5月前
|
关系型数据库 MySQL PHP
php wampserver的使用配置
本文介绍了WampServer在Windows系统下的配置和使用方法,包括如何修改PHP时区为中国标准时区PRC、更改Apache服务器端口号以避免冲突、设置起始页以及如何创建和管理虚拟目录。通过这些步骤,用户可以更有效地在本地环境中开发和测试PHP程序。
php wampserver的使用配置
|
4月前
|
tengine 应用服务中间件 Linux
Tengine、Nginx安装PHP命令教程
要在阿里云Linux上安装PHP,请先更新YUM源并启用PHP 8.0仓库,然后安装PHP及相关扩展。通过`php -v`命令验证安装成功后,需修改Nginx配置文件以支持PHP,并重启服务。最后,创建`phpinfo.php`文件测试安装是否成功。对于CentOS系统,还需安装EPEL源和Remi仓库,其余步骤类似。完成上述操作后,可通过浏览器访问`http://IP地址/phpinfo.php`测试安装结果。