Apache Wamp WampServer 配置多端口 多站点 虚拟目录
第一步:配置Apache 的 httpd.conf
#Listen 0.0.0.0:80
Listen 80
Listen 81
第二步:开启虚拟站点
所属文件:httpd.conf
#Virtual hosts
#Include conf/extra/httpd-vhosts.conf
修改为
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
第三步:配置conf/extra/httpd-vhosts.conf
<VirtualHost *:81>
ServerAdmin [email protected]
DocumentRoot "/data/wwwroot"
ServerName 81
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
<Directory "/data/wwwroot">
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
如果访问站点出现you don‘t have permission to access / on this server(Apache Server权限访问问题)
修改httpd.conf:
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory />
AllowOverride none
# Require all denied
</Directory>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。