Restricting Access

Any user can restrict access to one of their web page directories by using htaccess. This is a feature that is enabled on our Apache Web server. When a user tries to access a directory that contains a file called ".htaccess", the web server will prompt the visitor to enter a username and password.

The first step is to create a file called .htaccess (you can do this in your own text editor then FTP it to the server with your web pages -MAKE SURE TO UPLOAD THIS FILE IN ASCII, not binary- or you can telnet in and use any UNIX editor like emacs or jove). This file should be in the directory which contains the documents to restrict access to. The contents of this file specify the name of the password file.

For example if you had the user jdoe with web documents in the local directory "/usr/homes/username/www/private_html" that you wanted to restrict access to, your .htaccess might look like:

      AuthUserFile /usr/homes/username/www/private_html/.htpasswd
      AuthName jdoe-private_html
      AuthType Basic
      <Limit GET>
      require valid-user

Note that .htaccess will not work if there is more than one space after AuthUserFile.

Second, you will need to create a .htpasswd file. This file contains the passwords of the users. To create the .htpasswd file you MUST telnet onto our server, then change directory to the directory you want to restrict access to, and type:

      htpasswd -c .htpasswd someuser

for the first user (where someuser is the username). You will then be prompted twice for the user's password. The -c option causes the .htpasswd file to be created. For each additional user type:

      htpasswd .htpasswd someuser

This is simply restricted access, these pages are not secure and can be read by other users under certain conditions.
Please remember that there is absolutely no support for programming or scripting from Channel 1.

All Content and Design
· © Copyright 1996-2000, Channel 1 Communications® ·
· Channel 1® is a Service of Cybergate, Inc. ·