外部地址无法访问虚拟主机test01.com,求解?

系统: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


慕粉4282406
浏览 1433回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP