Apache禁止在bitnami中出现错误,但我不知道为什么

时间:2018-10-22 14:34:43

标签: apache

我在家中运行apache服务器。所以我用bitnami 今天,我购买了一个域名,并通过apache将其连接起来。所以我这样更改了httpd-vhosts文件

<VirtualHost *80>
  ServerAdmin  ****@****.com
  DocumentRoot "C:/Bitnami/wampstack-7.1.20-1/apache2/htdocs"
  ServerName ####.com
  ServerAlias www.####.com
</VirtualHost>

,我也更改了httpd文件

# Virtual hosts
Include conf/extra/httpd-vhosts.conf  (deleted #)

除此之外,我没有改变。 因此,httpd中Directory标签的一部分就是这样

<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Bitnami/wampstack-7.1.23-0/apache2/htdocs"
<Directory "C:/Bitnami/wampstack-7.1.23-0/apache2/htdocs">
    #
    # 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 None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

我认为,目录标签设置的问题已通过此解决

<Directory "C:/Bitnami/wampstack-7.1.23-0/apache2/htdocs">
    #
    # 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 None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

,并且我已经在窗口中设置了有关bitnami文件夹的权限。 (服务器计算机的操作系统是窗口)

但是它没有用。

当我在https文件中更改此部分时,此问题的一个提示

<Directory />
    AllowOverride none
    Require all denied
</Directory>

变成这样

<Directory />
    AllowOverride none
    Require all granted
</Directory>

它可以工作。 (实际上,已解决了“禁止访问”错误,但是出现了“未确定的URL”错误。我想我今天购买了域,因此DNS服务器似乎尚未将域与ip连接。)

但是,出于安全性考虑,我不能始终维护“要求全部授予”。因此我应该将其保持为“要求所有被拒绝”。

是什么问题?帮帮我。

0 个答案:

没有答案