更改了Apache配置,现在localhost / ~username / index.php抛出403错误

时间:2015-04-03 22:38:07

标签: permissions apache2 localhost

我一直在努力使用yosemite在我的mac上运行laravel php框架。我更改了/ etc / apache2中的httpd.conf文件以及我的用户配置文件username.conf。现在更改后我得到403"禁止你没有权限在这台服务器上访问/~username/my_phpinfo.php。"我也不应该使用Apache / 2.4.9。这是我目前拥有的用户配置文件:

<Directory "/Users/<username>/Sites/">
AllowOverride All
Options Indexes FollowSymLinks 
Require all granted
</Directory>

我也觉得httpd.conf文件的这一部分(行号〜= 238)可能存在错误:

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
#
# 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
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks Multiviews
MultiviewsMatch Any

#
# 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.
#
Require all granted
Order allow,deny
Allow from all
</Directory>

0 个答案:

没有答案