使用yii2访问禁止的Xampp Mac osx

时间:2017-01-29 07:07:21

标签: php macos apache yii2 yii2-advanced-app

我收到以下错误:

禁止访问!

您无权访问所请求的目录。没有索引文档或目录是读保护的。     如果您认为这是服务器错误,请与网站管理员联系。     错误403

当我在 httpd-vhosts.conf 中使用以下代码时:

<VirtualHost *:80>
ServerName frontend.dev
DocumentRoot "AmanAgarwal/Projects/basic/yii-application/frontend/web/"

<Directory "AmanAgarwal/Projects/basic/yii-application/frontend/web/">
   # use mod_rewrite for pretty URL support
   RewriteEngine on
   # If a directory or a file exists, use the request directly
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   # Otherwise forward the request to index.php
   RewriteRule . index.php

   # use index.php as index file
   DirectoryIndex index.php

   # ...other settings...
   # Apache 2.4
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
   Order Deny,Allow
   Allow from all
   Require all granted

   ## Apache 2.2

   </Directory>
</VirtualHost>

0 个答案:

没有答案