ResponsiveWeb Home > Hosting Plans > Virtual Hosting > FAQ > Details
Password Protection FAQ
Password Protection

The following describes how you will be able to limit access/protect certain directories in your web site hosted on UNIX or Linux servers. For more information about access control, refer to Access Configuration or User Authentication Tutorial

Creating the access control file
  1. Create a metafile (ASCII text file) containing the following:
    AuthUserFile /home/www.yourdomain.com/.htpasswd
    AuthGroupFile /home/www.yourdomain.com/.htgroup
    AuthName ByPassword
    AuthType Basic
    
    <Limit GET>
    require group groupname
    </Limit>

    If you do not wish to create a group file (which is only required if you wish to allow different users access to different directories while maintaining only one password file):

    AuthUserFile /home/www.yourdomain.com/.htpasswd
    AuthGroupFile /dev/null
    AuthName ByPassword
    AuthType Basic
    
    <Limit GET>
    require valid-user
    </Limit>
  2. Save your metafile. Now you need to put this file in the directory that you wish to enforce access control.  Upload this file, make sure you upload it in ASCII format to the directory, then rename it to ".htaccess".

Creating the password file
  1. Logged in via ssh to the FTP server, type in the following command (which will take you to the directory)
    cd /home/www.yourdomain.com
    
  2. If you this is the first time you are doing this, remember to use "-c" in the following command. If the .htpasswd file already exists, do not use "-c:
    htpasswd -c .htpasswd username
    
  3. You will be prompted to enter the password.
Creating the group file
  1. Create a metafile (ASCII text file) containing the following:
    groupname:username1 username2
  2. Save your metafile. Now you need to upload this file in the /home/www.yourdomain.com/ directory.  Remember to upload this file in the ASCII format.
 



  Hot Tip
 did you know?



Dedicated Servers Dedicated Servers
Get A Quote for HIPAA, FISMA, and GLBA standards compliant applications & dedicated servers.
Budget Servers, Gaming Servers & High Performance Servers also available!
Our Racks Colocated Servers
Budget Racks: Your Servers, Network Switches, Remote Reboot Switches, & Appliances
Security Critical Locked Racks: FISMA, HIPAA, and GLBA Compliant
Unleash the Power of ResponsiveWeb's acclaimed CommerceBolt! E Commerce in a Box
ResponsiveWeb CommerceBolt: Amazon.com grade shopping cart!
Get listed in Froogle, Pricegrabber, Bizrate, & manage your inventory, shipments, orders, & more.
Web Design Web Design
Clean, Professional, and Effective. Web Design without the child's play.
Cutting Edge Design: starting at $299, with a Free Domain Name, Free Database, & Free Month of Hosting
VoIP Home & Office VoIP Telephone Services
Unlimited USA & Canada Calls: $20 per month; Canadian & USA phone numbers available. Special Offer to SMU Students
responsivEfax: efaxing, Toll Free: with virtual attendant and more, VoIP Office: our quote is 20% less your current carrier
Contact
Offices
24 Hilltop Road
Edison NJ 08820
 
86 Timberhill Drive
Franklin Park, NJ 08823
Datacenter
470 Vanderbilt Ave
Brooklyn NY 11238
Rapid Response
866-315-3263

More Contact Options