我在Zend中有一个项目,目录为: /var/www/ project /public
文件httpd.conf的内容为:
<VirtualHost 127.0.0.1:80>
DocumentRoot "/var/www/Project/public"
ServerName project.localhost
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "/var/www/Project/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>和/etc/hosts:
127.0.0.1 localhost
127.0.1.1 michal-centrala
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 project.localhost当我转到页面http://project.localhost时,我得到以下错误:内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求。
请联系服务器管理员,没有提供地址,并告知他们错误发生的时间,以及您可能执行的任何可能导致错误的操作。
有关此错误的详细信息,请参阅服务器错误日志。
服务器日志如下:
[Sun Jun 23 01:31:56 2013] [alert] [client 127.0.0.1] /var/www/Project/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration问题出在哪里?
发布于 2013-06-23 07:42:10
在httpd.conf中启用mod_rewrite
最可能的行
LoadModule rewrite_module libexec/apache2/mod_rewrite.so被注释掉了
#LoadModule rewrite_module libexec/apache2/mod_rewrite.sohttps://stackoverflow.com/questions/17256341
复制相似问题