本节内容:
Appserv本机多端口配置文件
在Appserv配置多端口网站的方法,可以参考如下:
1,conf/httpd.conf
只需将2个虚拟主机启动的注释符号#去掉即可。
2、extra/ httpd-vhosts.conf
只需先将2个NameVirtualHost ,再将2个端口的指向指好即可。
附,httpd-vhosts.conf文件。
#
# Virtual Hosts
#
# Use name-based virtual hosting.
#
NameVirtualHost *:81
NameVirtualHost *:82
#
# VirtualHost example:
# Almost any apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or Serveralias in any <VirtualHost> block.
#
<VirtualHost *:81>
ServerAdmin admin#jb200.com
DocumentRoot D:/AppServ/www
ServerName www.jb200.com
ErrorLog D:/AppServ/www/errornongye.log
CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:82>
ServerAdmin admin#jb200.com
DocumentRoot D:/AppServ/www/xuejk
ServerName www.jb200.com
ErrorLog D:/AppServ/www/xuejk/errornongjiale.log
CustomLog logs/dummy-host2.appservnetwork.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.x
DocumentRoot "C:/Apache2.2/docs/dummy-host2.x"
ServerName dummy-host2.x
ErrorLog "logs/dummy-host2.x-error.log"
CustomLog "logs/dummy-host2.x-access.log" common
</VirtualHost>
有时间的话, 大家可以在自己的环境中亲自测试下Appserv本机多端口的配置。