私の構成:
Wampserver 3.0.032ビットApache2.4.17 php 5.6.15 mysql 5.7.9
私の問題:WampServerは正しく起動しますが、ログ内のプロジェクトにアクセスしようとすると、次のようになります。
[Sat May 21 10:55:39.393866 2016] [authz_core:error] [pid 6984:tid 1140] [client 127.0.0.1:50070] AH01630: client denied by server configuration: C:/wamp/www/project/api/app/
[Sat May 21 10:55:39.395878 2016] [authz_core:error] [pid 6984:tid 1140] [client 127.0.0.1:50070] AH01630: client denied by server configuration: C:/wamp/www/project/api/src/
それでも、構成ファイルを確認しましたが、すべて問題ないようです。
私の設定ファイルがあります:
httpd.conf:
<Directory "C:/wamp/www/">
#
# 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
# [httpd.apache.org]
# 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 all
#
# Controls who can get stuff from this server.
#
#onlineoffline tag - don't remove
#Require local
Require all granted
</Directory>
httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost
DocumentRoot "C:/wamp/www"
<Directory "C:/wamp/www">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost.project.com
#ServerAlias localhost.project.com
DocumentRoot "C:/wamp/www/project/website/web/"
<Directory "C:/wamp/www/project/website/web/">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/project/api"
ServerName api.project.com
#ServerAlias api.project.com
<Directory "C:/wamp/www/project/api">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/Demo_websocket/web"
ServerName demo.websocket
#ServerAlias demo.websocket
<Directory "C:/wamp/www/Demo_websocket/web">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
私のhostsファイル:
私はあなたが何を意味するのかよく理解していないと思います。ホストファイルの内容は次のとおりです。127.0.0.1localhost127.0.0.1api.project.com 127.0.0.1 localhost.project.com
私はすでにVirtualHostですべてを許可するように設定しようとしましたが成功しませんでした:s
誰かがすでにこの問題に直面して解決策を見つけたなら、私は興味があります。ありがとうございました
あなたは仮想ホスティングでローカルホストを使用しています、これがあなたのホストファイルであるならば、それは正しいです
127.0.0.1 localhost
127.0.0.1 api.project.com
127.0.0.1 localhost.project.com
ローカルブラウザで、これらのURLの1つを記述します。
ただし、仮想ホスト構成は特定のホストに応答する必要があり、*には応答しない必要が<VirtualHost api.project.com:80>
あります。<VirtualHost *:80>
また、汎用*仮想ホストはリストの最後になければなりません。その場合、結果は次のようになります。
<VirtualHost localhost.project.com:80>
ServerAdmin [email protected]
ServerName localhost.project.com
#ServerAlias localhost.project.com
DocumentRoot "C:/wamp/www/project/website/web/"
<Directory "C:/wamp/www/project/website/web/">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost api.project.com:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/project/api"
ServerName api.project.com
#ServerAlias api.project.com
<Directory "C:/wamp/www/project/api">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost demo.websocket:80>
ServerAdmin [email protected]
DocumentRoot "C:/wamp/www/Demo_websocket/web"
ServerName demo.websocket
#ServerAlias demo.websocket
<Directory "C:/wamp/www/Demo_websocket/web">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost
DocumentRoot "C:/wamp/www"
<Directory "C:/wamp/www">
Options +Indexes +FollowSymlinks
AllowOverride All
</Directory>
</VirtualHost>
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加