Password lock a web page
From CVL Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | There are several different way to protect a web page. | + | There are several different way to protect a web page. With all of these, you create a HyperText Access file ('''.htaccess''') in the directory that you want to password protect. This file will password protect all of the files (web pages) in that directory and all files (web pages) in any subdirectories. |
(Note that the name of this file starts with a period.) | (Note that the name of this file starts with a period.) | ||
Line 6: | Line 6: | ||
* Creating a Username and Password that is not tied to any other authentication mechnism. | * Creating a Username and Password that is not tied to any other authentication mechnism. | ||
* Using the campus PID/Password. | * Using the campus PID/Password. | ||
− | * Using CVL accounts for login | + | * Using CVL accounts for login. |
− | = | + | =Creating a Username and Password= |
− | + | ||
− | + | Using this method you can make up any username password pairs you want, they do not need to be tied to computer accounts or the campus PID system. Why might you want | |
+ | to use this? You might want to have one password for all people who want to access this web page. | ||
+ | |||
+ | '''.htaccess''' | ||
+ | |||
+ | AuthName "buzz off" | ||
+ | AuthType Basic | ||
+ | AuthUserFile /home/jkh/public_html/secure/.htpasswd | ||
+ | require valid-user |
Revision as of 13:48, 12 February 2008
There are several different way to protect a web page. With all of these, you create a HyperText Access file (.htaccess) in the directory that you want to password protect. This file will password protect all of the files (web pages) in that directory and all files (web pages) in any subdirectories.
(Note that the name of this file starts with a period.)
There is three ways that people usually might like to password protect a web page:
- Creating a Username and Password that is not tied to any other authentication mechnism.
- Using the campus PID/Password.
- Using CVL accounts for login.
Creating a Username and Password
Using this method you can make up any username password pairs you want, they do not need to be tied to computer accounts or the campus PID system. Why might you want to use this? You might want to have one password for all people who want to access this web page.
.htaccess
AuthName "buzz off" AuthType Basic AuthUserFile /home/jkh/public_html/secure/.htpasswd require valid-user