2016-06-23 4 views
0

더 이상 내 가상 호스트 (기본 호스트 인 localhost)에만 액세스 할 수 없습니다. 그것은 저를 만든다 :403 금지됨 - 허락 - VHOSTS

이 서버에/당신은 액세스 할 수있는 권한이 없습니다

을 금지.

이미 아파치 2.4에서 모듈을로드하고 있으며, 이미 모든 권한 폴더 (chmod 755)를 확인합니다.

내 아파치 - vhosts.conf 파일 :

는 httpd.conf 파일에 DirectoryIndex에를 변경할 때 내가 찾은 유일한 것은이
# 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> 

는, 그것을 실행하지 않고 나에게 PHP 라인을 렌더링 .. 그리고 httpd-vhosts.conf 파일에 directoryIndex를 추가해도 아무런 효과가 없습니다.

도움 주셔서 감사합니다.

업데이트 : 이유를 모르겠다.하지만 php 7.0.6에서 PHP 5.6으로 전환 할 때 여전히 403 금지 된 페이지가 표시됩니다.

답변

0

(OP 대신 게시 됨).

내 Mac을 업그레이드 한 후 httpd.conf에서 호출되지 않은 php7_module 때문에 php switcher가 작동하지 않습니다.