2016-06-23 4 views
0

Я не смог получить доступ к моим vhosts (только по умолчанию, localhost). Это делает меня:403 Forbidden - Permission - VHOSTS

Запретный

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

Я уже загружаю модуль в свой 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 ничего не делало.

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

UPDATE: Не понимаю почему .. Но он работает при переключении на PHP 5.6, на php 7.0.6, все еще предоставляя мне запрещенную страницу 403.

ответ

0

(Отправлено от имени ОП).

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