专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 应用服务器

Lighttpd配置simple-vhost(简便的,自识别的虚拟主机),该如何处理

发布时间:2010-06-14 17:11:32 文章来源:www.iduyao.cn 采编人员:星星草
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

------解决方案--------------------


感谢分享
------解决方案--------------------
新手学习
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: