标签归档:lighttpd

lighttpd设置虚拟目录

1、编辑lighttpd.conf

vim /etc/lighttpd/lighttpd.conf

在最后添加:

include_shell "cat vhosts.d/*.conf"

设置存放虚拟目录配置文件的目录。

2、设置虚拟目录

vim /etc/lighttpd/vhosts.d/aaa.com.conf

添加:

$HTTP["host"] == "www.aaa.com" {
server.name = "www.aaa.com"
server.document-root = "/home/aaa.com"
server.errorlog = "/var/log/lighttpd/www.aaa.com-error.log"
accesslog.filename = "/var/log/lighttpd/www.aaa.com-access.log"
}

3、建立相关目录

cd /home
mkdir aaa.com
chown -R lighttpd:lighttpd aaa.com/

4、重启lighttpd

service lighttpd restart

CentOS Linux yum方式安装llmp

llmp是指用linux+lighttpd+mysql+php搭建的web环境。lighttpd是一个安全、快速、稳定、灵活的开源web服务器,官网:http://www.lighttpd.net/

一、安装epel、remi更新源
由于官方源没有lighttpd软件包,所以要用到epel源。能用yum安装就不编译了。
CentOS5.x 32bit:
http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm
CentOS5.x 64bit:
http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
CentOS6.x 32bit:
http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-7.noarch.rpm
CentOS6.x 64bit:
http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm
为了使用较新版本的php、mysql安装remi源。
CentOS5.x:
http://rpms.famillecollet.com/enterprise/5/remi/i386/remi-release-5-8.el5.remi.noarch.rpm
CentOS6.x:
http://rpms.famillecollet.com/enterprise/6/remi/i386/remi-release-6-1.el6.remi.noarch.rpm
继续阅读CentOS Linux yum方式安装llmp