ROCKCI HOME 
DIY Virtual Servers 
 

User Manual   
Chapter 1 Introduction 
Chapter 2 Getting Started 
Chapter 3 Features 
Chapter 4 Security 
Appendix A Administrative 
Appendix B add-ons 
Appendix C facilities 

 
SEARCH FOR YOUR DOMAIN
www.
.com
.net
.org

Powered by ROCKCI DIY

ROCKCI DIY Virtual Server User Manual Chapter 3-4-10 ROCKCI DIY Virtual Server Features -
Password Protecting  Webpages
ROCK Capital Interactive 
Chapter 3-4-10 ROCKCI DIY Virtual Server Features 
Password Protecting  Webpages    
 ROCKCI DIY virtual servers allow users to easily install password protection on the contents of a particular directory. For complete details, please refer to the Apache Website

 You can install password protection for a directory under your ROCKCI DIY Virtual Domain by following the following simple steps: 

 

  1. Create a file named ".htaccess" in the directory you wish to protect. 
  2. Place the following information within the .htaccess file:
  3.  (don't forget to upload in ascii mode!
  4.  (don't forget the "" signs around "Resource Name"
  5.  AuthUserFile path to the directory/.passwdfile 
    AuthGroupFile /dev/null 
    AuthName "Resource Name" 
    AuthType Basic 
    <Limit GET> 
    require valid-user 
    </Limit> 
      
     For example: 

    AuthUserFile /usr/local/www/data/joediyuser/private/.passwdfile 
    AuthGroupFile /dev/null 
    AuthName "Joe DIY User Co. Private Access"  
    AuthType Basic 
    <Limit GET> 
    require valid-user 
    </Limit> 

      

  6. Create a password file named ".passwdfile" by using the htpasswd utility. Execute the following commands from the UNIX shell while within the directory to be protected:
  7.  cd /usr/local/www/data/joediyuser/private 
    htpasswd -c .passwdfile {username to add} 

     You will then be prompted for a password for the user name you supplied. For example: 

     htpasswd -c .passwdfile bob 
    Password: ******** 

      

  8. Set the permissions on the files with the following commands:
  9.  chmod 644 .htaccess 
    chmod 644 .passwdfile 

  10. To add a user, execute the htpasswd command as above without the -c option. For example:
  11.  htpasswd .passwdfile betty 
    Password: ******** 

      

  12. To remove a user, edit the .passwdfile file and remove the line with that user's information. 
  13. To change a user's password, remove the user and then recreate the user with the new password. 
  14. Now when a www user trys to access a page in the protected directory, he/she will be asked for a user name and password. If he/she types the correct information, access to the page is granted. 

  15. Prompt
 
Previous Table of Contents Next
Powered by ROCKCI DIY
Powered by ROCKCI DIY Virtual Servers

This Web Page © Copyright 1999 ROCKCI ,Cleveland, OH. All rights reserved.
Last edit 3/18/99 by webmaster@rockci.com