读书人

Lighttpd配置simple-vhost(简便的自

发布时间: 2012-02-11 09:51:35 作者: rapoo

Lighttpd配置simple-vhost(简便的,自识别的虚拟主机)
原地址:http://doc.zenw.org/linux/ch02s03.html#id2843896


simple-vhost

- 功能介绍 -

simple-vhost就是自动将你在浏览器地址栏里输入的URL匹配到一个document-root下与URL相同名字的目录中

这样可以实现不需要配置,就可以简单的创建虚拟主机


- 打开simple-vhost功能 -

将server.modules中的mod_simple_vhost去除注释


- 配置simple-vhost功能 -

The complete document root is constructed either by

如果完整的配置了simple-vhost目录

server-root + hostname + document-root

or if this path does not exist by

如果没有完整的配置simple-vhost目录

server-root + default-host + document-root

A small example should make this idea clear:

一个小例子

/var/www/
/var/www/logs/
/var/www/servers/
/var/www/servers/example.org/
/var/www/servers/example.org/lib/
/var/www/servers/example.org/pages/
/var/www/servers/mail.example.org/
/var/www/servers/mail.example.org/lib/
/var/www/servers/mail.example.org/pages/

将配置文件中以下项目解除注释

simple-vhost.server-root = "/var/www/servers/"
simple-vhost.default-host = "example.org"
simple-vhost.document-root = "pages"


- 相关链接 -

http://redmine.lighttpd.net/wiki/1/Docs:ModSimpleVhost 官方标准设置说明


更多内容可访问:
http://www.zenw.org
http://doc.zenw.org
http://doc.zenw.org/linux
http://doc.zenw.org/mysql
http://doc.zenw.org/developer

[解决办法]


感谢分享
[解决办法]
新手学习

读书人网 >应用服务器

热点推荐