简体   繁体   中英

Apache2 in Ubuntu - configuration domain - page not found

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

A content of file httpd.conf is:

<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

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?

Enable mod_rewrite in httpd.conf

Most likely line

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

is commented out

#LoadModule rewrite_module libexec/apache2/mod_rewrite.so

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM