Chinaunix首页 | 论坛 | 博客
  • 博客访问: 336574
  • 博文数量: 127
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 333
  • 用 户 组: 普通用户
  • 注册时间: 2013-03-27 14:44
个人简介

兴趣是最好的学习契机!

文章分类

全部博文(127)

文章存档

2017年(1)

2016年(3)

2015年(54)

2014年(58)

2013年(11)

我的朋友

分类: 系统运维

2015-09-08 12:16:13

原文地址:安装启动lighttpd 作者:zhongyj

参考
下载 lighttpd-1.4.20.tar
解压 tar xvf lighttpd-1.4.20.tar
到lighttpd-1.4.20目录
./configure --prefix=/userhome/zhongyj/sfw/lighttpd
make
make install

已经安装到/userhome/zhongyj/sfw/lighttpd目录
/userhome/zhongyj/sfw/lighttpd>mkdir logs
/userhome/zhongyj/sfw/lighttpd>mkdir html

创建配置文件
/userhome/zhongyj/sfw/lighttpd/sbin>vi lighttpd.conf
server.port = 3000
server.modules = (
                        "mod_access",
                        "mod_accesslog" )
server.document-root = "/userhome/zhongyj/sfw/lighttpd/html/"
server.errorlog = "/userhome/zhongyj/sfw/lighttpd/logs/error.log"
server.pid-file = "/userhome/zhongyj/sfw/lighttpd/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 = "/userhome/zhongyj/sfw/lighttpd/logs/access.log"

创建html测试文件
/userhome/zhongyj/sfw/lighttpd/html>vi index.html

hello lighttpd

启动服务
/userhome/zhongyj/sfw/lighttpd/sbin>lighttpd -D -f lighttpd.conf

打开网页
这里172.0.0.1是本机,也可以在其他机器指定这个机器的IP
阅读(497) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~