![]() |
|
| WAM Home Page | WAM How-to Page |
cd /users/$USER/pub
pico Welcome.html
There you go, you now have a personal homepage with url:
http://www.wam.umd.edu/~your_user_name
or http://www.glue.umd.edu/~your_user_name if you did those steps
on your Glue account.Of course, you'll edit the Welcome.html using the html language. Yahoo has diverse html guides and tutorials if you need to find out more about html.
<a href="your_map_file.map"><img src="your_image_file.gif" ISMAP></a>
find ~/html -name '*.html' | xargs grep -l '~olduser |
xargs perl -p -i.OLD -e 's/~olduser/~newuser/g'
If you don't want to leave the original files around, just omit
the .OLD after the -i (which is the perl option for
edit-in-place).
AddType application/x-myapp .myapp
This example makes the server return MIME type
application/x-myapp for all files with the extension .myapp in the
directory with that .htaccess file in it, and any directories
below it.
The protection is based on directory and it's controlled by a file .htaccess in that specified directory.
1. Restricting by IP address
Create .htaccess file in the directory you want to restrict access. Here's an example .htaccess:
order deny,allow
deny from all
allow from 128.8.*
Another example:
order allow,deny
allow from all
deny from 128.8.28.130
This will allow access from anywhere except machine with ip
address 128.8.28.130
2. Password base restriction using external db file
Create the password db file using dbmanage.
Here's an example:
dbmanage /pub/whatever/private_stuff/.mr_passwd_file adduser bob
New password:
Re-type new password:
User bob added with password encrypted to dFWh/sR2Ve9.g
That will create a user 'bob' in file
/pub/whatever/private_stuff/.mr_passwd_file with the passwd you
typed, in the above case we set the passwd to "Hi Bob"
Next we need to create an .htaccess file in the directory you want to password-protect. Here's an example .htaccess file to be used with the db file above:
AuthType Basic
AuthName ByPassword
AuthDBUserFile /pub/whatever/private_stuff/.mr_passwd_file
require user bob
This will make that directory only accessible by using
username "bob" and password "Hi Bob"
Some notes: While this will exclude all the folks useing web-browsers to look at the directory, this will not exclude users who have access to that directory. If you want to exclude them too, you should give access to system:httpd and exclude acccess from system:anyuser. For example:
fs sa /pub/whatever/private_stuff system:anyuser none system:httpd read
| WAM Home Page | WAM How-to Page |