下载配置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
|
Ubuntu C++
Ubuntu20.04(LTS)换源(阿里、清华)以及sources.list分享
自用好使,谨慎操作 鄙人在安装完Ubuntu之后,安装Code::blocks的时候,在此之前需要安装C/C++编译环境build-essential,在安装的时候报出有关软件包依赖性的关系问题,经过一波研究发现,有的大佬通过安装aptitude来解决问题,因为aptitude可以很好地解决依赖关系 但是在安装aptitude的时候,还是出现了依赖关系,莫得办法 安装aptitude的命令
8731 0
|
JavaScript Java 关系型数据库
基于springboot的计算机在线考试管理系统
本系统基于Spring Boot、Java、Vue与MySQL,构建高效安全的在线考试管理平台,推动教育信息化发展。
springboot静态资源目录访问,及自定义静态资源路径,index页面的访问
本文介绍了Spring Boot中静态资源的访问位置、如何进行静态资源访问测试、自定义静态资源路径和静态资源请求映射,以及如何处理自定义静态资源映射对index页面访问的影响。提供了两种解决方案:取消自定义静态资源映射或编写Controller来截获index.html的请求并重定向。
springboot静态资源目录访问,及自定义静态资源路径,index页面的访问