|
|
|
|
Home
Search |
How to secure your Home page
Introduction There are ways to secure
one's home page (or a part of it!) by using the built-in password protection
mechanisms. In the Math Dept., we use the APACHE
Web Server. The following describes ways to secure your homepage on the
Math server. The same can be followed for the Mathpost server or any other
server where APACHE is installed.
Using User Authentication There are two ways of restricting access to documents:
The former can be used, for example, to restrict document access to inside a company. However, if the people who are allowed to access the documents are widely scattered, or the server administrator needs to be able to control access on an individual basis, it is possible to require a username and password before being allowed access to a document. This is called user authentication. Setting up user authentication takes two steps: first, you create a file (called ".htpasswd" containing the usernames and passwords). Second, you tell the server which resources are to be protected (by creating a restricted directory and placing the ".htaccess" file in it) and which users are allowed (after entering a valid password) to access them. Thus there are four components to making a particular HTML/PS/PDF/text or any file protected from general net access:
________________________________________________________________________ tony:aXYBugr1Auyh guest:Pl.AJqYMyMKeM ________________________________________________________________________ IMPORTANT: since both '.htaccess' and
'.htpasswd'
files start with a '.', they are hidden when you do an 'ls' comand in the
restricted directory. To see these file listed you should do : 'ls -al'
instead. TEST it out! OK, so you created the files and put in passwords for one or more usernames. Now suppose you created a user 'math' with the password 'passwd' and also put in a sample HTML page (called, say, sample.html) in the restricted directory. Now open NETSCAPE and type in the following URL: http://math.asu.edu/~loginname/restricted/sample.html [login_name refers to your Math Server Login user name !] and a dialog box should pop up asking you for a USERNAME and PASSWORD.
Type in 'math' and 'passwd' respectively and it should work and allow you to view the sample HTML page that you created. If either the USERNAME or PASSWORD is wrong, it will show the following error message saying that you are not authorized to view the contents of the URL/link. ____________________________________________________________________________________________________
This server could not verify that you are authorized to access the
document you requested. Either you supplied the wrong credentials (e.g.,
bad password), or your browser doesn't understand how to supply the credentials
required.
So now you can put personal pages, class tests, homeworks, solutions, research papers on the net (by simply dumping them into the restricted directory) without worrying about some unauthorized person having access to them. |