当前位置: 技术问答>java相关
如何在apache里面设置多个虚拟主机?能不能给个例子?
来源: 互联网 发布时间:2015-01-09
本文导语: | 我把我的一部分配置文件给你一份: NameVirtualHost 10.0.0.2 DocumentRoot "E:/Dzh/websit/nyber" ServerName www.nber.com DirectoryIndex index.htm Alias /studydhtml/ "E:/Dzh/websit/nyber/study/" DocumentRoot "E:/Dzh/websit/Apache" ServerName www.apac...
|
我把我的一部分配置文件给你一份:
NameVirtualHost 10.0.0.2
DocumentRoot "E:/Dzh/websit/nyber"
ServerName www.nber.com
DirectoryIndex index.htm
Alias /studydhtml/ "E:/Dzh/websit/nyber/study/"
DocumentRoot "E:/Dzh/websit/Apache"
ServerName www.apache.org
DirectoryIndex php.php
NameVirtualHost 192.168.0.1
DocumentRoot "E:myjavaapplet"
ServerName www.myjava.com
DirectoryIndex index.php
这三个ip是我网卡邦定的,www.nber.com、www.apache.org、www.myjava.com这三个不用我说了吧
NameVirtualHost 10.0.0.2
DocumentRoot "E:/Dzh/websit/nyber"
ServerName www.nber.com
DirectoryIndex index.htm
Alias /studydhtml/ "E:/Dzh/websit/nyber/study/"
DocumentRoot "E:/Dzh/websit/Apache"
ServerName www.apache.org
DirectoryIndex php.php
NameVirtualHost 192.168.0.1
DocumentRoot "E:myjavaapplet"
ServerName www.myjava.com
DirectoryIndex index.php
这三个ip是我网卡邦定的,www.nber.com、www.apache.org、www.myjava.com这三个不用我说了吧
|
完成了对httpd的修改以后,还需要在dns上面做一下添加工作。把 这些虚拟主机的名字添加到dns里面。
nt,2000都可以做域名服务器的。
:)
nt,2000都可以做域名服务器的。
:)
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。