Howdi Selvi
 
here is a quick way of setting up
 
User Authentication

Howto setup User Authentication (.htaccess)

This is a quick setup of user authentication on Apache Web Server

1. Open up you httpd.conf file and search for AllowOverride - it should say AloowOverride None
2. Set it to read AllowOverride AuthConfig
3. Next Search for AccessFileName.
4. Set it to AccessFileName to read .htaccess
5. Save and Close the httpd.conf
6. Next you need to setup the usernames and passwords, to do this you need to be in the directory that you want users to authenticate themselves on.
7. So now that your in dir e.g /usr/local/apache/htdocs/protectedfolder type htpasswd -c (-c for create new file) passwordfilename username
8. Once you have entered this will prompt for the password, then retype password.
9. Now you have a user inserted into your passwordfilename.
10. In the directory that you want to put restrictions on, do a vi .htaccess
11. Insert the following into the file
 
    AuthName "Sorry Restricted Area"
    AuthType Basic
    AuthUserFile /usr/local/apache/htdocs/htmleditor/passfile     ### <<<<<--------This is the path to your passwordfile #######
 
    <Limit GET PUT POST>
    require valid-user
    </Limit>
12. Now save and close the .htaccess file.
13. Now retstart you apache server and user authentication should now be working .....
14. If you need to add more users use the same command as above without -c.....
Hope this solves the problem
 
Later
 
Chris

Chris Grigor
---------------------------------------------------------------------------------------------------------
Technical Team Leader - Client Services
Tel: +27 11 340 7200
Fax: +27 11 340 7345

Mobile:
Always commit to KISS (Keep It Simple Stupid)
---------------------------------------------------------------------------------------------------------
M-WEB Business Solutions
Making it happen.

Go shopping @ http://shopping.mweb.co.za
Get your business online @ http://business.mweb.com
 

-----Original Message-----
From: Selvi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 7:32 AM
To: [EMAIL PROTECTED]
Subject: password in apache

How to protect my web page by username with password?

Reply via email to