【问题标题】:.htaccess: Options not allowed here Centos 7.htaccess:Centos 7 中不允许的选项
【发布时间】:2014-12-13 22:43:21
【问题描述】:

在服务器 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

【问题讨论】:

    标签: php apache .htaccess laravel-4 centos


    【解决方案1】:

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

    Options All
    

    根据 Apache 文档:

    # 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.
    

    【讨论】:

    • 当我将我的网站移动到另一个文件夹网站时,网站运行良好 /home/test/test/public_html/
    • 是的,因为其他目录部分可能在 Apache 配置中有 Options All 指令。
    猜你喜欢
    • 2013-08-26
    • 2023-01-03
    • 2011-10-29
    • 2015-08-15
    • 1970-01-01
    • 1970-01-01
    • 2019-03-25
    • 2018-09-23
    • 1970-01-01
    相关资源
    最近更新 更多