Apache password creation
- Hi all,
a couple months ago I asked if someone knew how to make an encrypted password
for the .htpasswd-file with a ntp-clip. Nobody answered, but maybe not too many
are playing with Apache's features ...
Meanwhile I came up with my own solution, and I'll share it:
1. You need Apache (Win32) installed
2. This is the clip:
^$GetDosOutput("C:\%APACHE-PATH%\BIN\HTPASSWD.EXE -nb ^?[username]
(Remember to point \%APACHE-PATH%\ to Your installation directory!)
The output for e.g. user:password would be something like:
but the password is never encrypted the same, as everytime some "salt" is added.
Paste this line into a file named ".htpasswd" (the dot makes it invisible on the
server!); for every user, You can add such a line.
In another file named ".htaccess" You write:
AuthName "Restricted Directory"
AuthUserFile /%FULL PATH%/.htpasswd
For more info: