Apache запрещена ошибка в битнами, но я не знаю почему - PullRequest
0 голосов
/ 22 октября 2018

Я запускаю сервер Apache у себя дома.поэтому я использую битнами.Сегодня я купил домен и подключаю его на 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 #)

вне этогоЯ не изменился.Итак, часть тега Directory в httpd выглядит следующим образом:

<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 решается с помощью этого

<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-адресом.)

но я не всегда могу поддерживать «Требуется все предоставленное» из-за безопасности.поэтому я должен сохранить это как «Требовать все отказано».

В чем проблема?помоги мне ..

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...