当前位置:操作系统 > Unix/Linux >>

aolserver中使用虚拟域

1. ns_section "ns/server/${servername}/modules"段中增加一行:

  ns_param vhost ${bindir}/vhost.so

  2. 将编译好的vhost.so文件copy到目录/usr/local/aol/bin目录下

  3. 启动aolserver即实现了简单的虚拟域,

  比如:用户访问www.weiqiong:30080网站的首页index.html实际上访问的是pageroot

  (一般是/usr/local/aolserver/servers/server1/pages)下面的www.weiqiong.com:30080目录下的index.html

  4. 如果希望有些域名的访问,不受虚拟域配置的影响,就是说其根目录还是pageroot,做如下操作:

  配置文件中增加如下一段:

  ns_section "ns/server/${servername}/module/vhost"

  ns_param realhosts "www.weiqiong.com:30080;www.chenxu.com"

  这时候再访问www.weiqiong.com:30080,会直接找pageroot下面的index.html页面本文来自:http://www.xiaoyaxiao.com/2008.html
发表您的高见!
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,