I have a folder on a server where I have to add a password. I have researched and I have seen that there is a file .htpasswd
. The problem is that it does not work for me.
.htaccess
AuthName "Directorio privado"
AuthType Basic
AuthUserFile /www/test/app/app/.htpasswd
require valid-user
.htpasswd
user:$apr1$Xdj0RvXW$quha1UZwlRErZvVE9qgSS/
The .htaccess
I generated from here , the user is: user
and the password is: test
I do not know if the problem is in the path I indicated in .htaccess
or that the password in .htpasswd
is not right. Because I tried another website that generates it and the code was different.
Server response
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>Internal Server Error</h1>
<p>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
</p>
<p>
Please contact the server administrator,
[email protected] and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
</p>
<p>
More information about this error may be available
in the server error log.
</p>
</body>
</html>