APMServ 5.2.6虚拟主机配置bug

相信大家都用过APMServ 5.2.6吧??

今天好蛋疼的是,通过视图化去配置虚拟主机进行访问本地项目,竟然无法访问,搞了大半天,还是无法解决这个BUG!

 

后来没办法,只能通过手工进行配置了,具体方法如下:

找到安装目录:“D:/APM/APMServ5.2.6/Apache/conf/apmserv”,把此目录下的vhost.conf文件用记事本打开,并修改为

 

#虚拟主机1

NameVirtualHost *:80
<VirtualHost *:80>
ServerName zhxy.cc
DocumentRoot "D:/workspace/zhxy-me"
RewriteEngine On
RewriteRule ^/$ /index.php [R=301]
<Directory "D:/workspace/zhxy-me">
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>

#虚拟主机2
<VirtualHost *:80>
ServerName zhxy.com
DocumentRoot "D:/workspace/zhxy"
RewriteEngine On
RewriteRule ^/$ /index.php [R=301]
<Directory "D:/workspace/zhxy">
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>

 

如果想要配置多个虚拟主机,只要在继续添加:

 

<VirtualHost *:80>
ServerName zhxy.com
DocumentRoot "D:/workspace/zhxy"
RewriteEngine On
RewriteRule ^/$ /index.php [R=301]
<Directory "D:/workspace/zhxy">
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>

并把ServerName、DocumentRoot、Directory这三个地方进行相应的修改就可以解决这个BUG了,

希望我这个办法可以帮到大家!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值