摘自:http://www.blogjava.net/rain1102/articles/162396.html
首先打开配置文件httpd.conf,
找到Listen <ip>:80
或者Listen:80
添加或更改为你要添加的端口(不能有冲突)如下面的例子:
Listen 80
Listen 81
Listen 82
再建立虚拟主机,如下:
NameVirtualHost localhost:80
NameVirtualHost localhost:2222
NameVirtualHost localhost:6666
<VirtualHost localhost:80>
DocumentRoot E:\webroot\
ServerName localhost:80
</VirtualHost>
<VirtualHost localhost:2222>
DocumentRoot f:\webroot\
ServerName locahost:2222
</VirtualHost>
<VirtualHost localhost:6666 >
DocumentRoot D:\webroot\web\phpmyadmin
ServerName localhost:6666
</VirtualHost>
------------------------------------------------------------------
摘自:http://www.cnblogs.com/donepuzzle/archive/2008/05/10/1191057.html
Listen 80
Listen 88
#===============================================================================
<VirtualHost 127.0.0.1:88>
DocumentRoot "D:\EmpireServer\php\apache2.2\htdocs"
</VirtualHost>
<Directory "D:\EmpireServer\php\apache2.2\htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
没有评论:
发表评论