SN-10122 附来源、原文与上下文。
Drupal 的 .htaccess 文件使用 mod_rewrite,提供不带 ? 参数的简洁 URL,但它没有生效,因为 Apache 未配置“AllowOverride All”,导致文件中的设置被拒绝。我们需要这样设置,才能让 Drupal 按照我们的要求与另一个网站共存。
Drupal's .htaccess file which uses mod_rewrite to allow clean URLs without the ? parameter is not working because its changes are rejected because Apache is not configured with "AllowOverride All". This is needed to make Drupal coexist with the other site the way we want.
我需要修改以下文件的权限,以便修复:
/etc/apache2/sites-available/default
/etc/apache2/sites-available/default-ssl
/etc/apache2/httpd.conf
I need access to change these files to fix it:
/etc/apache2/sites-available/default
/etc/apache2/sites-available/default-ssl
/etc/apache2/httpd.conf
下面是计划的修复方法。即使你自己来做,也请仍然给我 httpd.conf 的访问权限,以防以后需要再次修改。
Here's the planned fix. If you do it yourself, please still give me access to httpd.conf in case I need to change it again later.
在 /etc/apache2/sites-available/default 中把第二处“AllowOverride None” 改为“AllowOverride All”
In /etc/apache2/sites-available/default change the 2nd instance of "AllowOverride None" to "AllowOverride All"
并在 /etc/apache2/sites-available/default-ssl 中把第二处“AllowOverride AuthConfig” 改为“AllowOverride All”
and in /etc/apache2/sites-available/default-ssl change the 2nd instance of "AllowOverride AuthConfig" to "AllowOverride All"
将
/etc/apache2/httpd.conf
替换为
/home/maintenance/httpd.conf
replace
/etc/apache2/httpd.conf
with
/home/maintenance/httpd.conf
之后可能需要重新启动 Apache。 (apache2ctl graceful)
This probably requires Apache to be restarted after. (apache2ctl graceful)