To create the correct password, you can create a php file and run it locally (on your computer, not on the web server) with the following contents:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> </head> <body> <form method="post" accept-charset="utf-8"> <input type="text" name="clear"/> <input type="submit" name="submit" value="generate" /> </form> <?php header("Content-Type: text/html; charset=utf-8"); if (isset($_POST['clear']) && $_POST['clear'] != '') { $cl = $_POST['clear']; $pw = crypt($cl, base64_encode($cl)); echo $pw; } ?> </body> </html>
I usually put my .htpasswd file in a directory named / htpasswd / outside of the webcontent directory, for example AuthUserFile /home/www/usr122/files/htpasswd/.sportsbar_reports_htpasswd (and not in the webcontent /home/www/usr122/html/htpasswd/ folder ) and rename the .htpasswd file as intended, for example. .sportsbar_reports_htpasswd
The password file should look like
testusername:dGATwCk0tMgfM
where username is testusername and password is testuserpassword
ddlab
source share