.htaccess:此处不允许选项Centos 7

时间:2014-10-18 13:48:01

标签: php apache .htaccess laravel-4 centos

我在服务器centos 7上部署laravel网站时遇到此错误 .htaccess:这里不允许选项

[Sat Oct 18 09:38:43.336180 2014] [core:alert] [pid 13593] [client 182.186.240.3:7034] /home/test/public_html/.htaccess: Options not allowed here
[Sat Oct 18 09:38:43.727177 2014] [core:alert] [pid 13589] [client 182.186.240.3:7123] /home/test/public_html/.htaccess: Options not allowed here

1 个答案:

答案 0 :(得分:0)

您需要在Apache配置的<Directory...>部分提供此行并重新启动Apache服务器,以便在Options中使用.htaccess指令:

Options All

根据Apache docs:

# 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.2/mod/core.html#options
# for more information.