系统:win10
wamp版本 3.0.6
Apache版本 2.4.23
本机可以访问test01.com
局域网内其他电脑不可以访问
httpd-vhosts.conf修改如下:
<VirtualHost *:80>
ServerName test01.com
DocumentRoot d:/wamp/www/test01
<Directory "d:/wamp/www/test01">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require all granted
</Directory>
httpd.conf修改如下:(+斜体部分)
DocumentRoot "D:/wamp/www"
<Directory "D:/wamp/www">
#
# 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.4/mod/core.html#options
# for more information.
#
Options +Indexes +FollowSymLinks +Multiviews
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require local
Require all granted
</Directory>
hosts文件加127.0.0.1 test01.com