为什么我不能在 CentOS 和 FreeBSD 上为 httpd.conf 使用相同的目录配置?

Ser*_*ius 0 freebsd apache-httpd

我正在将产品从 CentOS 6 迁移到 FreeBSD 10.3,并将 my_product.conf 放入 apache24/Includes。一件奇怪的事情,在 CentOS 上它可以与:

<Directory "/usr/local/share/my_product">
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)

但不适用于 FreeBSD。相反,它适用于:

<Directory "/usr/local/share/sso_portal">
     AllowOverride None
     Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)

为什么?我在哪里可以找到有关所有差异、里程碑等的综合信息?

小智 7

您使用的 apache 网络服务器版本在您的问题中缺少详细信息。所以我假设它是 2.2(CentOS 6 上的默认值)和 2.4(不确定 FreeBSD 上是否是默认值)。如果是真的,那么 apache 的配置存在差异。有关更多详细信息,请参阅https://httpd.apache.org/docs/2.4/upgrading.html。这不是 CentOS 或 FreeBSD 的问题。