我的Appche配置文件(httpd.conf)找到<Directory "f:/demo/">,没得 "Deny from all" 这句话 求解?

来源:2-4 WAMPServer多站点配置

会点前端的月老

2015-07-16 23:16

打开Appche配置文件(httpd.conf),搜索httpd-vhosts项,去掉改行的注释符号#。搜索网站目录(例子里是"demo"),
找到<Directory "f:/demo/">,向下找到"Deny from all"(意思是不允许外部访问)改成"Allow from all",
再把下一行"Allow from 127.0.0.1"(意思是允许本机访问)加#号注释掉。

<Directory "D:/PHP5.4_code/PHPCode/PHPProject/">
    #
    # 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

    #
    # 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
</Directory>

我的没得 Deny from all 我不知道 Require local是什么意思? 请问我是不是需要加上这句话楠 Allow from all? 我在www.wampserver.com上面下的最新版本Apache

写回答 关注

2回答

  • BobWang
    2015-07-19 22:35:02

    看wiki,在问答板块后面

  • 会点前端的月老
    2015-07-20 22:01:40

    1.打开httpd.conf 找到”Include conf/extra/httpd-vhosts.conf“去掉前面的“#”号,保存
    2.打开httpd-vhost.conf 在最末尾加上这样一段
    <VirtualHost *:80>
       ServerName test01.com
       DocumentRoot &q...
    这个&q...  是啥意思啊  BobWang老师

PHP入门篇

PHP入门教程轻松学习,行业大牛帮您快速掌握PHP编程基础知识。

456424 学习 · 6590 问题

查看课程

相似问题