Why is not working .htaccess & .htpasswd?

Did authorization on file
<files admin.php>
AuthName "Need authorization"
AuthType Basic
AuthUserFile /web/rootdomain/public_html/pw/.htpasswd
require valid-user
</files>

Here is htacess and HTPC with folder PV
AuthName "Need authorization"
AuthType Basic
AuthUserFile /web/domain/public_html/pw/.htpasswd
require valid-user

<files *.css>
Satisfy Any
Order Deny,Allow
Allow from All
</files>

<files *.js>
Satisfy Any
Order Deny,Allow
Allow from All
</files>

coga:$apr1$BL5luAsI$LjpDxDQY8lF44Whv/TDwF.
PS: On the website it worked
Put the password, did everything as it was before..
Popping up window username and password and I enter :
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at info@thatdomain to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
July 9th 19 at 13:49
1 answer
July 9th 19 at 13:51
Solution
1. Show the logs.
2. Go to nginx :)
3. Try:
Require valid-user
Require with a capital letter
4. The exact path to the file correct?
5. To store the password in a public folder is not a good idea, but it is, advice.
the logs are clean, how to implement nginx ? ))) It is in the bundle - Kali58 commented on July 9th 19 at 13:54
the path he took from the FTP, I think, so changed did not help. I'm interested to implement ) to store there not going to) - Kali58 commented on July 9th 19 at 13:57
: nginx.org/ru/docs/http/ngx_http_auth_basic_module.html
nginx is not only efficient, but also easier and more logical to configure. Apache is only needed for very old legacy projects. - otho.Mraz23 commented on July 9th 19 at 14:00

Find more questions by tags Apachehtaccess