【问题标题】:Are my Apache2 RewriteEngine On and AllowOverride All changes secure?我的 Apache2 RewriteEngine On 和 AllowOverride All 更改是否安全?
【发布时间】:2020-02-05 06:05:35
【问题描述】:

我对我的网站配置进行了一些更改,以便在 Apache2 上运行的 Xenforo2 上获得友好的 URL。

a) 我在 .htaccess 文件中将 RewriteEngine 设为“开启”

b) 我在 .htaccess 文件中将 RewriteBase 修改为 '/'

c) 我在我的 Apache2 配置部分将 AllowOverride 从“无”更改为“全部”。

这些更改是否会让我面临安全问题? 我的 apache2 版本是 2.4.25 (Debian)

【问题讨论】:

    标签: php apache2 xenforo


    【解决方案1】:

    没有。这 3 项对您的 .htaccess 文件和 apache 配置的添加/修改不会造成直接的安全风险。

    • 开启RewriteEngine 就是这么简单。允许 htaccess 进行重定向等。
    • 更改RewriteBase 只是设置将发生重定向的基本网址。更多信息可以在这里找到:How does RewriteBase work in .htaccess
    • 在您的 apache 配置中将 AllowOverrideNone 设置为 All 可以让您的 .htaccess 文件完全正常工作。如果它设置为None,您的.htaccess 将不起作用,因为 htaccess 是您的 apache 配置的覆盖。

    【讨论】:

      猜你喜欢
      • 2015-09-12
      • 1970-01-01
      • 1970-01-01
      • 2013-10-25
      • 2011-03-01
      • 2014-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多