以下以APMSERV集成环境为例:
1、找到你的apache上的配置文件httpd.conf,用记事本打开, D:\APMServ\Apache\conf
2、修改以下几项: Listen 80 下增加一行:这里为81, Listen 80 Listen 81
3、把conf文件接到下面,找到这一段:
#APMServ默认虚拟主机
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot "D:/APMServ/www/htdocs"
<Directory "D:/APMServ/www/htdocs">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
在下面添加不同端口绑定的不同目录
NameVirtualHost *:81
<VirtualHost *:81>
ServerName *
DocumentRoot "D:/APMServ/www/htdocs/rz"
<Directory "D:/APMServ/www/htdocs/rz">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
重启apache