Kod
<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>
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>
Oraz zawartość pliku /etc/hosts :
Kod
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
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
Gdy wejdę na stronę http://project.localhost/, otrzymuję komunikat:
Cytat
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.
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.
I treść server loga:
Cytat
[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
Znalazłem gdzieś informację w sieci, iż powinienem do pliku httpd.conf wsadzić coś takiego:
Kod
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
Ale gdy to zrobię, to serwer apache niechce mi się zrestartować (wywala błąd o niemożliwości znalezienia tego pliku libexec/apache2/mod_rewrite.so).
Pomóżcie mi! : (