0

My server is running Apache 2.4.18 with below config:

/home/xxx/www/.htaccess:

AuthType Digest
AuthName "Authenication Required"
AuthDigestProvider file
AuthUserFile /path/to/.htdigest
Require valid-user

/home/xxx/www/share/.htaccess:

Require all granted

I want password protection for all directories and files except for the share subdirectory. With the above configuration, a prompt for password authentication is shown when the user visits http://my.site/share/, although he can still see the content by cancling (or closing) the dialog.

What I want is to remove the prompt for password authentication for the share subdirectory. Is there anything wrong to my configuration?

1
  • Too late to help OP, I'm guessing, but in case someone stumbles on this question (like I did), I was eventually able to solve a similar problem when I realized the landing page for my unprotected directory was calling a javascript file from a password-protected directory. Putting those scripts in an unprotected directory eliminated the unwanted password prompt.
    – acullum
    Jul 20, 2021 at 19:30

2 Answers 2

0

Try adding AuthType None in /home/xxx/www/share/.htaccess.

3
  • Tried. No luck.
    – Danny Lin
    Mar 2, 2018 at 19:44
  • Is the .htaccess file readable by Apache? Mar 2, 2018 at 19:50
  • Apache has read and write permission of all files below /home/xxx/www/ directory. You mean this?
    – Danny Lin
    Mar 3, 2018 at 0:45
0

Try add:

Satisfy Any

Allow from all

To: /home/xxx/www/share/.htacces

2
  • Tried. No luck.
    – Danny Lin
    Mar 3, 2018 at 13:41
  • Add 'require none' to this.
    – liske1
    Mar 3, 2018 at 15:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .