Scenario
I am working with two servers both running apache. An identical .htaccess
is working on one server and not the other.
Code
AuthUserFile .htpasswd
AuthType Basic
AuthName "Password Required"
Require user jackson
Order Deny,Allow
Deny from All
<FilesMatch "^ads\.txt$">
Allow from all
</FilesMatch>
Satisfy Any
Question
Anonymous visitors are able to see ads.txt
on server A without logging in, however, they'll see 401 (unauthorized)
on server B. What could be the reason or what can I do to troubleshoot further?
Extra
- If I switch to
Allow from All
on line 6 the ads.txt is STILL blocked on server B by a401
. If I comment out theFilesMatch
condition then it's unblocked. This only escalates the confusion.. - Server B has a
.htaccess
in the parent directory. Setting it toAllow from All
didn't have any effect. - Both files are
664
and belong to a group apache has access to.
Are both servers running the same linux distribution and version and are both running the same version of Apache?
Although the files might have the same permissions (664 and same owner/group), is the full path accessible on both servers? Maybe one of the subfolders has too restrictive permissions.