Installation of Apache can be found here: Install WAMP (Windows-Apache-MySQL-PHP) with ZIP packages – (5)
Here is a simple example for sharing files to others with authentication by Apache HTTPD on Windows.
Folder to share is D:ToolsApachehtdocsshare
1. Update httpd.conf
In <Directory "D:ToolsApachehtdocs"> session, update "AllowOverride None" to "AllowOverride AuthConfig" or "AllowOverride All".
2. Create password file
Run the following command: (If you have never create such a password file, such as D:ToolsApacheconfpasswd.txt, then use "-c" option.)
D:ToolsApachebinhtpassword -c -b D:ToolsApacheconfpasswd.txt user_for_share passwd_for_share
If the password file exists, use "-c" option will overwrite it.
D:ToolsApachebinhtpassword -b D:ToolsApacheconfpasswd.txt user_for_share2 passwd_for_share2
3. Create .htaccess file
AuthType Basic AuthName "My Share for Restricted Access" AuthUserFile D:/Tools/Apache/conf/passwd.txt Require valid-user
If you wanna require a specific user for "share" folder, then use "Require user user_for_share" insted of "Require valid-user".
Restart Apache service, and then open http://localhost/share/. It will require your authentication now.