Ubuntu中的Apache2 - 配置域 - 找不到页面

时间:2022-10-06 10:03:52

I have a project in Zend, in directory: /var/www/Project/public

我在Zend中有一个项目,目录在:/ var / www / Project / public

A content of file httpd.conf is:

文件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>

and /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

When I go to page http://project.localhost i get the following error: Internal Server Error

当我转到页面http://project.localhost时,我收到以下错误:内部服务器错误

The server encountered an internal error or misconfiguration and was unable to complete your request.

服务器遇到内部错误或配置错误,无法完成您的请求。

Please contact the server administrator, [no address given] 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.

服务器错误日志中可能提供了有关此错误的更多信息。

The server log is following:

服务器日志如下:

[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

Where's the problem?

问题出在哪里?

1 个解决方案

#1


0  

Enable mod_rewrite in httpd.conf

在httpd.conf中启用mod_rewrite

Most likely line

最有可能排队

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

is commented out

被注释掉了

#LoadModule rewrite_module libexec/apache2/mod_rewrite.so

#1


0  

Enable mod_rewrite in httpd.conf

在httpd.conf中启用mod_rewrite

Most likely line

最有可能排队

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

is commented out

被注释掉了

#LoadModule rewrite_module libexec/apache2/mod_rewrite.so