[mpm-itk] problem with authentication (AuthType Basic...)

Knut Auvor Grythe knut at auvor.no
Fri Mar 29 09:22:32 CET 2013


On Fri, Mar 29, 2013 at 08:39:33AM +0100, Patrick Proniewski wrote:
>> I'm having a bit of trouble following your explanation, but a possible
>> cause for permission trouble like this is attempts to access the
>> .htaccess file in the parent directory. To remedy this, you can either
>> make sure the .htaccess file is world readable, or set AllowOverride
>> none on / and only set AllowOverride on each subdir. With AllowOverride
>> none, apache will not try to open a .htaccess file at all.
> 
> the root of the vhost already have "AllowOverride None". But as I
> understand it, Apache will attempt to parse .htaccess files on the way
> down to destination, not upward 

If you have a vhost in /srv/vhosts/www.example.com and try to access
http://www.example.com/dir1/dir2/, Apache will try to access these files, in
order:

  /.htaccess
  /srv/.htaccess
  /srv/vhosts/.htaccess
  /srv/vhosts/www.example.com/.htaccess
  /srv/vhosts/www.example.com/dir1/.htaccess
  /srv/vhosts/www.example.com/dir1/dir2/.htaccess

This means that if you set AllowOverride none on
/srv/vhosts/www.example.com/, Apache will still try to read from these:

  /.htaccess
  /srv/.htaccess
  /srv/vhosts/.htaccess

If one of those reads fail, you're in trouble. The solution is to set
AllowOverride none on /.

-- 
Knut Auvor



More information about the mpm-itk mailing list