Lighttpd Web服务器安装与配置

OS: CentOS release 5.5
Lighttpd: 1.4.28

安装

运行
检查配置文件

启动lighttpd服务

结束lighttpd服务


或者使用Linux的系统服务启动停止lighttpd服务

测试

在/srv/www/lighttpd目录下创建一个文件index.html,内容如下:

然后访问:http://localhost/index.html

配置php支持

编辑/etc/lighttpd/modules.conf文件,将其中以下行前面的注释删除


编辑/etc/lighttpd/conf.d/fastcgi.conf文件,添加以下行

在/srv/www/lighttpd目录下创建一个文件test.php,内容如下:

然后访问:http://localhost/test.php

你可能感兴趣的:(lighttpd)