lighttpd基本配置

由于工作中需要用到lighttpd,自己安装了一个,遇到了一些问题记录如下:

(1)安装

只需要下面3步即可:

./configure --prefix=/home/users/xxx/lighttpd/lighttpd-1.4.20-bin

make

make install

(2)到安装之后的目录下创建2个文件夹

mkdir logs

mkdir html

(3)修改配置文件

server.port = 8321

server.modules = (

"mod_access",

"mod_accesslog" )

server.document-root = "/home/users/xxx/lighttpd/lighttpd-1.4.20-bin/html/"

server.errorlog = "/home/users/xxx/lighttpd/lighttpd-1.4.20-bin/logs/error.log"

server.pid-file = "/home/users/xxx/lighttpd/lighttpd-1.4.20-bin/lighttpd.pid"

index-file.names = ( "index.html" )

mimetype.assign = (

".html" => "text/html",

".js" => "text/javascript")

server.max-keep-alive-requests = 4000

dir-listing.activate = "disable"

accesslog.filename = "/home/users/xxx/lighttpd/lighttpd-1.4.20-bin/logs/access.log"

(4)修改html文件

<body>

hello lighttpd

</body>

(5)启动lighttpd

./lighttpd -D -f lighttpd.conf -m ../lib/ &

注意启动的时候必须指明lib的位置,否则会报如下错误:

2014-08-22 16:19:32: (plugin.c.165) dlopen() failed for: /home/users/xxx/lighttpd/lighttp-1.4.20-bin/lib/mod_indexfile.so /home/users/xxx/lighttpd/lighttp-1.4.20-bin/lib/mod_indexfile.so: cannot open
shared object file: No such file or directory

2014-08-22 16:19:32: (server.c.610) loading plugins finally failed

(6)测试

ok,至此搭建了一个最简单可用的lighttpd服务!

时间: 2024-12-11 22:11:52

lighttpd基本配置的相关文章

lighttpd安装配置

官网: http://www.lighttpd.net/http://www.cronolog.org # 安装依赖包 yum -y install libevent libcurl gamin-devel pcre-devel zlib-devel bzip2-devel python-pycurl # 安装lighttpd cd /usr/local/src tar xf lighttpd-1.4.35.tar.gz cd lighttpd-1.4.35 ./configure --with

linux下安装lighttpd配置详解

为什么要使用lighttpd?      apache不可以吗?      在支持纯静态的对象时,比如图片,文件等 ,      lighttpd速度更快,更理想      至于它和apache的比较,很多文档,大家可以百度一下 本次使用1.4.41版本 官方网点:http://www.lighttpd.net 官方下载站点:http://www.lighttpd.net/download/ 官方给出了安装配置的详细文档 http://redmine.lighttpd.net/projects/

lighttpd - 配置

Lighttpd core 配置 connection.kbytes-per-second     限制每一个链接的速度etag.use-inode                   Etag使用inode号 etag.use-mtime                   Etag使用修改时间etag.use-size                    Etag使用文件大小Etag用来检验服务器上内容是否变化,所以当分布式时就不能用inode号和修改时间,因为不容机器是不一样的.文件大小

ruby环境的配置

安装 Ruby 解析器 一些Linux发行版本,MacOSX操作系统都自带Ruby解析器,但是我仍然建议自行下载ruby源代码编译安装.因为一方面可以自己定制ruby安装的路径,另一方面可以在编译过程中自行添加更多的特性. ruby的源代码可以从Ruby官方网站下载: http://www.ruby-lang.org/en/downloads/ 下载源代码包到本地Linux主机,然后解压缩,进入该目录,进行配置,编译和安装: tar xzvf ruby-1.8.5.tar.gz cd ruby-

fastcgi 分布式

以lighttpd fastcgi写一下自己对fastcgi的理解. 假设一台机器A上运行lighttpd,在这台主机上只是对请求进行分发. 而在其他多台机器上运行多个fastcgi进程,用来接收来自机器A分发过来的请求,并进行处理. 那lighttpd的配置fastcgi部分,应该配置ip和port(配置socket时是针对lighttpd和fastcgi进程在同一台机器上). 而fastcgi进程应该监听ip:port上的请求. 稍微修改下前面的配置文件和代码. server.documen

Android XMPP服务器, BOSH(Http-Binding)和WEB客户端搭建

目标: 搭建一个XMPP服务器, 实现在web page上用javascript与自己XMPP服务器通信, 匿名登录并与任何一个XMPP(Jabber)帐户通信. (Gtalk目前尚有问题) XMPP服务器可能不是必须的(见下文, 我没有尝试) 环境与配置: XMPP服务器:ejabberd文档HTTP-Binding: 使用ejabberd搭建, 5280端口.Javascript Client:Strophe文档 安装Ejabberd yuminstallejabberd #apt-get

编辑器服务器搭建

操作系统:CentOS 6.x 64位 编辑器框架:php5.5 + mongodb-org-3.2 + lighttpd-1.4.39 1. 安装mongodb-org-3.2 (1)添加yum的mongodb仓库 sudo vim /etc/yum.repos.d/mongodb-org-3.2.repo 添加以下内容: [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/

Ubuntu系统配置篇|Leon Dong‘s Blog

基本配置 有一些软件和事情基本上装完系统是必须需要装的,个人的习惯如下 sudo apt-get install updatesudo apt-get install g++ vim ssh-server screen iftop gitsudo apt-get dist-upgrade #升级系统软件到最新版git config –global user.name "xxx"git config –global user.email "xxx"ssh-keygen

轻量级web服务器lighttpd的编译及配置(for x86-linux)

转自:http://blog.163.com/ljf_gzhu/blog/static/131553440201211522317367/ 备注: PC Linux:Ubuntu-10.10 Linux用户:root lighttpd版本:1.4.30 gcc版本:4.4.5 1. 编译.安装 1.1. 先到lighttpd官网下载对应版本的软件包: http://www.lighttpd.net/ 我下载的是 lighttpd-1.4.30.tar.gz 1.2. 将压缩包解压到任意目录(我的