2016-06-23 41 views
0

私の仮想ホストにアクセスできませんでした(デフォルトホストのlocalhostのみ)。それは私を作る:403禁止 - 許可 - 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> 

私が見つけた唯一のものは、httpd.confファイルでのDirectoryIndexを変更する場合、それを実行せずに私のPHPのラインを描画..ですそして、 httpd-vhosts.confファイルにdirectoryIndexを追加しても何も起こりませんでした。

ありがとうございました。

更新理由:わかりません..しかし、PHP 5.6に切り替えると動作していますが、PHP 7.0.6では403の禁止ページが表示されます。

答えて

0

(OPのために掲示)

my macをアップグレードした後、httpd.confで呼び出されなかったphp7_moduleによってphp switcherが機能しませんでした。

関連する問題