Password protecting a website
Password protecting a website or part of a website is used to control access.
Which method you use depends on the operating system, web server, language and content management system.
If you use the FreeBSD operating system and the Apache web server, a simple solution is to use the htpasswd utility.
In the following example, two users are given access to a password protected part of a website. Each user will be given a username and a password. The same commands can be used for changing password.
nano -w www/www.foobar.com/ppc/.htaccess
AuthUserFile /usr/home/foobar/www/www.foorbar.com/ppc/.htpasswd AuthType Basic AuthName "Foobar Password Protected Content" Require valid-user
htpasswd -c www/www.foobar.com/ppc/.htpasswd ann
htpasswd www/www.foobar.com/ppc/.htpasswd bob
When opening the password protected part of the website, a dialog appears, and, if correct password is given, gives access to the password protected content.
Note, that website password protection should not be considered safe in general.
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.