Menjalankan Apache di Ubuntu Precise, dengan PHP 5.5
Mencoba mengakses saya var/www/
memberi saya 500.
/var/log/apache2/error.log
menunjukkan:
/var/www/web/.htaccess: <IfModule not allowed here
.htacess saya adalah:
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>
Ke dalam apache.conf saya menambahkan:
<Directory />
AllowOverride ALL
</Directory>
Dan itu berhasil setelah saya me-restart apache.