|
|
|||||||
How to limit your pages to the Rice campusAn introduction to WWW access controlSample .htaccess files | Notes for NCSA httpd users | More information
BackgroundAccess control for the web means "who can read what" (or in the case of CGI programs, "who can run what").For the Unix-based NCSA and Apache web servers commonly used at Rice, access control is set on a per-directory basis by putting a ".htaccess" file in the directory. Subdirectories inherit access control rules from their parent directories, and each web server has a default set of rules which apply to any directory that contains no ".htaccess" file anywhere in its path. There are two kinds of access control: IP-address-based and password-based.
Sample .htaccess filesAccess from Rice campus only# This file limits access to users on the Rice campus, including dialup # and ISDN users. Both the name ".rice.edu" and explicit numeric subnets # are specified in order to accommodate machines whose names may be # messed up in the host tables. # # Because Rice numeric subnets change occasionally, be sure to refer # back to http://www.rice.edu/web/access-control.html and watch # the RICEWWW mailing list / rice.riceinfo.www newsgroup for updates. # order deny,allow deny from all allow from .rice.edu allow from 128.42 allow from 192.136.146 allow from 192.136.153 allow from 192.225.19 allow from 204.1.8.162 Access from a subdomain# This file limits access to users on the IT subdomains (subnets 30 and 42). # order deny,allow deny from all allow from 128.42.42 allow from 128.42.30 Access from the whole world# This file allows access from everywhere (use this to get *looser* # access control if your server is restrictive by default). # order allow,deny allow from all
Notes for NCSA httpd usersThe above examples are for the Apache webserver most commonly in use at Rice. If you are using the older NCSA httpd server, there is a slight difference in the required syntax of .htaccess files. Specifically, the order, deny and allow specifications must be bracketed by a <Limit> directive: <Limit GET HEAD POST> ... </Limit> . Here is an example: # This file limits access to users on the Rice campus, including dialup # and ISDN users. Modified for use with NCSA httpd. # <Limit GET HEAD POST> order deny,allow deny from all allow from .rice.edu allow from 128.42 allow from 192.136.146 allow from 192.136.153 allow from 192.225.19 allow from 204.1.8.162 </Limit>Also note that NCSA httpd is inexplicably sensitive to proper Unix-style newline characters in the .htaccess file. Files which are missing newlines, even at the end of the last line in the file, will not work properly. For more information
Good luck. If you have questions, contact "riceinfo@rice.edu".
Back to selected WWW documentation
-- RiceInfo support (riceinfo@rice.edu) 2000.10.04 URL: http://www.rice.edu/web/access-control.html
|
|||||||
| For assistance with
IT services, e-mail problem@rice.edu.
For assistance with IT web pages, e-mail webteam@rice.edu. This page updated 10/25/00 © 2000 Rice University |
|||||||
|
|
|||||||