Upgrade von Ubuntu Webserver von 12.04 Precise Pangolin auf 14.04 LTS Trusty Tahr
Apache
Apache/2.2.22 -> Apache/2.4.7
Ofizielle Quelle dazu: https://httpd.apache.org/docs/trunk/upgrading.html
AllowOverride None
https://httpd.apache.org/docs/trunk/mod/core.html#allowoverride
to default, war früher, bei Apache 2.2
AllowOverride All
Eine Variante wäre „AllowOverride Indexes“ um DirectoryIndex in .htaccess zu erlauben.
AllowOverride Indexes
Alle DirectoryIndex in .htaccess finden die nicht auskommentiert sind:
grep -r DirectoryIndex --include .htaccess ./ | grep -v \#
Finde .htaccess files mit auskommentierten DirectoryIndex (#DirectoryIndex) und lösche diese Linie:
grep -r \#DirectoryIndex -Z -l --include .htaccess .\ | xargs -0 -n 1 sed -i -e '/DirectoryIndex/d'
mit:
-r: recursive
-z: no newline
-l: only machting filename, not matching sting
–include only match .htaccess
um .htaccess für mod_rewrite zu nutzen, nutze die Einstellung:
AllowOverride FileInfo Options
quelle: http://stackoverflow.com/questions/6995545/htaccess-rewriteengine-not-allowed-here
Wir nutzen auch noch mod_expires, darum brauchen wir auch Indexes:
AllowOverride FileInfo Options Indexes
Damit sind wir ganz nahe wieder bei:
AllowOverride All

