403 Запрещено - Разрешение - VHOSTS

Я больше не мог получить доступ к моим vhosts (только по умолчанию, localhost). Это делает меня:

запрещено

У вас нет разрешения на доступ к / на этом сервере.

Я уже загружаю модуль в мой httpd.conf, я нахожусь на apache 2.4, и я уже проверяю все папки разрешений (chmod 755).

Мой файл httpd-vhosts.conf:

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
Listen 80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/Users/POlo/Sites/polohome"
    ServerName polohome
    # Set access permission
    <Directory "/Users/POlo/Sites/polohome">
    DirectoryIndex index.html index.php
    Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot "/Users/POlo/Sites/aeglos"
        ServerName aeglos
        ErrorLog "/private/var/log/apache2/aeglos.local-error_log"
        CustomLog "/private/var/log/apache2/aeglos.local-access_log" common

        <Directory "/Users/POlo/Sites/aeglos/">
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

Единственное, что я обнаружил, это то, что при изменении DirectoryIndex в файле httpd.conf он отображает мне строку php, не выполняя ее... И добавление directoryIndex в файл httpd-vhosts.conf ничего не сделало.

Спасибо за помощь.

ОБНОВЛЕНИЕ: не понимаю, почему.. Но он работает при переходе на PHP 5.6, на php 7.0.6 все еще делает мне 403 запрещенную страницу.

1 ответ

Решение

(Опубликовано от имени ОП).

После обновления моего Mac мой php-переключатель не работал из-за php7_module, который не был вызван в httpd.conf.

Другие вопросы по тегам