Feel free to use these apache web tools to help generate configurations and other settings.
Create an Apache .htpasswd entry to add basic authentication to your web server. Complete the form and hit enter to generate the snippet.