Some webpage or even websites will ask for authentication to open, you may wondered about why they are using password and some ther authentication. The reason is website’s admin may want to share private message or that message have to be seen only by authenticated persons.
For every webpage we have to set password individually. Here we are going to set password for website station1.example.com . Technically setting password for website means password will be set
for the directory, where the website is hosted.
Creating password for a website will only done by htaccess file. htaccess file to be created in hidden format, so here specified as “.htaccess”
html] #vim .htaccess
/var/www/html – directory, where website is hosted.
user1 – username for authentication
123 – password for authentication
#htpasswd -mc /var/www/html/.pass user1