3

嗨,我正在运行 Ubuntu 10.04 LTS - 我创建项目的 Lucid Lynx

zf 创建项目测试

此命令自动生成一个不起作用的 .htaccess 文件我通过编辑 /etc/apache2/sites-available/default 文件设置配置了我的网络服务器(Apache2)

<Directory /var/www/>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
</Directory>

我收到以下错误

Internal Server Error
/**************************************************************************************/
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80
/****************************************************************************************/

请帮我

4

1 回答 1

15

你还没有加载 mod_rewrite,所以 Apache 不知道 RewriteEngine 行是什么意思。

在 ubuntu 上,您可能可以这样做(作为超级用户):

a2enmod rewrite
apache2ctl restart

否则,您将不得不编辑 apache 配置并添加这样的行来加载模块

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

您系统上的路径可能不同。

于 2010-10-19T13:19:41.510 回答