Executando o Apache no Ubuntu Precise, com PHP 5.5
Tentar acessar o meu var/www/
me dá 500.
/var/log/apache2/error.log
mostra:
/var/www/web/.htaccess: <IfModule not allowed here
meu .htacess é:
DirectoryIndex app.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
No meu apache.conf, adicionei:
<Directory />
AllowOverride ALL
</Directory>
E funcionou depois que reiniciei o apache.