e-mail sales
e-mail support
Fast feedback
 
 
sales@thewebpower.com
support@thewebpower.com
page
 
WEB SITE HOSTING

 

Secure web pages with Password

 



Home Page
Web Hosting
Order Now
About Us
Testimonials
Web Design
Web Advertising
Why Us
Support
Fast Feedback Page
Resellers



server technology

 

 

Needs Telnet access.

How do I secure all web pages in a directory?

If your home directory is yourlogin, create a file named .htaccess in your web directory that contains the following:

 

    AuthUserFile /usr/www/htdocs/yourlogin/yourdirectory/.htpasswd
    AuthGroupFile /dev/null
    AuthName ByPassword
    AuthType Basic
    <Limit GET POST>
    require user pumpkin
    </Limit>

Then in your home directory, type htpasswd -c /usr/www/htdocs/yourlogin/yourdirectory/.htpasswd pumpkin.

This will enable you to secure the directory so that only user pumpkin can enter this directory.

To add additional id/password pairs to the file, leave off the -c, which means 'create a new file'. For example, htpasswd .htpasswd linus. You may well want any of the user/password combinations you created in your .htpasswd file to allow access. Just say require valid-user instead of require user xxx in .htaccess and any of the users you created will be able to access the files.

Note that you want to store the .htpasswd file in your home directory so it is hidden from others. The one drawback to putting your .htpasswd file in your home directory is that you will have to slightly lower the security of your home directory. Go to /home (cd /home) and type chmod +x yourlogin. The WWW server needs execute permission on to read the .htpasswd file.

 

 

Home | Web Hosting | Web Design | Web Advertising | Why us?
Support | On-line Order | Fast Feedback Page | Resellers

THE WEB POWER © 1997-2003 all rights reserved
A branch of MEDIA POWER ADVERTISING