Reputation: 26410
Well, this is not a problem yet, but I don't understand why Apache is reading the .htaccess
files... I do:
grep -R "AllowOverride" /etc
and I have:
/etc/apache2/apache2.conf:# for additional configuration directives. See also the AllowOverride
/etc/apache2/sites-available/default: AllowOverride None
/etc/apache2/sites-available/default: AllowOverride None
/etc/apache2/sites-available/default: # AllowOverride None
/etc/apache2/sites-available/default:# AllowOverride None
/etc/apache2/sites-available/default-ssl: AllowOverride None
/etc/apache2/sites-available/default-ssl: AllowOverride None
/etc/apache2/sites-available/default-ssl: AllowOverride None
/etc/apache2/sites-available/default-ssl: AllowOverride None
/etc/apache2/conf.d/security:# AllowOverride None
/etc/apache2/conf.d/localized-error-pages:# AllowOverride None
/etc/apache2/mods-available/userdir.conf: AllowOverride FileInfo AuthConfig Limit Indexes
/etc/apache2/mods-available/alias.conf: AllowOverride None
/etc/apache2/sites-enabled/000-default: AllowOverride None
/etc/apache2/sites-enabled/000-default: AllowOverride None
/etc/apache2/sites-enabled/000-default: # AllowOverride None
/etc/apache2/sites-enabled/000-default:# AllowOverride None
/etc/apache2/mods-enabled/alias.conf: AllowOverride None
grep: /etc/blkid.tab: No such file or directory
Seems I have no AllowOverride all, so why is it working?
Upvotes: 4
Views: 7464
Reputation: 143906
But you have:
/etc/apache2/mods-available/userdir.conf: AllowOverride FileInfo AuthConfig Limit Indexes
Although this is related to the userdir configuration, the FileInfo
override is the bare minimum for apache to read htaccess files, within that context.
In the AllowOverride documentation, we have:
FileInfo
Allow use of the directives controlling document types (DefaultType, ErrorDocument, ForceType, LanguagePriority, SetHandler, SetInputFilter, SetOutputFilter, and mod_mime Add* and Remove* directives, etc.), document meta data (Header, RequestHeader, SetEnvIf, SetEnvIfNoCase, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, CookieTracking, CookieName), mod_rewrite directives (RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule), mod_alias directives (Redirect, RedirectTemp, RedirectPermanent, RedirectMatch), and Action from mod_actions.
When the AllowOverride is anything except "None", the htaccess file will be read and depending on the override options, certain statements in the htaccess file will be honored. It just so happens that the FileInfo
option covers a lot of the frequently used directives in an htaccess file.
Upvotes: 2