NYCPHP Meetup

NYPHP.org

[nycphp-talk] problem with authentication ( apache)

Dan Horning dan at mx2pro.com
Wed Sep 24 08:55:15 EDT 2003


The best way to do this .... Email dan h if you have questions

For this example, we will show how to password protect a directory with
a specific login and password. You can apply this procedure to virtual
sites also by changing the directories. 
   a.   Telnet in, and login as the User or admin or root
   b.   Navigate to the directory you want to password protect.
   c.   Create the .htaccess file in the directory (example: pico
.htaccess), it should contain the following lines:
      # Access file 
      
		order allow,deny
		allow from all
		require valid-user
		Authname "Administrative area"
		Authtype Basic
		AuthUserFile /DirectoryName/.htpasswd

	Replace "DirectoryName" with the appropriate path
	

Now you must create the .htpasswd file using the htpasswd tool. 
   a.	Type the following command to create the file and add a user: 
   b.   /usr/bin/htpasswd -c .htpasswd username 
   c.   You will be prompted for the users' password twice.  If you need
to add additional users to the file, use the command above without the
-c. 

Tutorial taken from email by John D. Gorena
[Support at JMG-Enterprises.com]

- Dan Horning
1-866-284-3150 (Toll-Free)
President:
     Technical Evangelism &
     Media Systems Administration
MX2 Productions
     Media from concept to execution.

> -----Original Message-----
> From: talk-bounces at lists.nyphp.org 
> [mailto:talk-bounces at lists.nyphp.org] On Behalf Of 
> Cdave77 at netscape.net
> Sent: Wednesday, September 24, 2003 8:37 AM
> To: talk at lists.nyphp.org
> Subject: [nycphp-talk] problem with authentication ( apache) 
> 
> 
> In apache i have created passward file and also placed 
> .htaccess in my folder.still i am not getting any popup 
> window for login and password.
> 
> please help !!
> 
> Linux Red 8.0
> ======
> this is in my .htaccess file
> 
> AuthType Basic
> AuthName "By Invitation Only"
> AuthUserFile /usr/local/apache/passwd/passwords
> Require user testuser
> 
> ====
> already have file called passwords in 
> /usr/local/apache/passwd with testuser in it .
> 
> another question , what should i keep as my folder's 
> Permission .is 755 okay ?
> 
> Thanks
> 
> 
> __________________________________________________________________
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your 
> free trial today!
> http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro
mo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list