Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess/.htpasswd help needed

Status
Not open for further replies.

GraphicFunn

Technical User
Feb 25, 2003
5
0
0
US
I am still unable to get the directory protected. I get a prompt to enter the password when I try to access the webpage in the members directory so I know that the htaccess file is being used but when I enter the proper password I just get the same password prompt over and over.

The .htaccess file looks like this:

AuthUserFile /_private/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Area "
AuthType Basic
<limit GET POST PUT>
require valid-user
</limit>

This is on a Linux virtual server. The _private directory is on the same level as the members directory that contains .htaccess. Both of these directories are listed in the main webpage directory with the main htm files so they are only one level down.

I created .htpasswd using the htpasswd program and it looks like this:

admin:lskdjfwiunsl
tom:iefewoidsfmn

the permissions are set to rw -r- -r- (644) for both .htaccess and .htpasswd

-How can I tell if the .htpasswd file is being accessed so I know if I have specified it's location properly?

-Where is the htconf file usually located?

-I know it is not advisable to put the .htpasswd file in the same directory as .htaccess file but could it be done for testing or would it not be read at all if it is in the protected directory? I have tried it both ways and neither work.

- Is there any restriction on the number of characters a password can be?

Thanks,
 
Try 755 permissions. I think you need to have Execute as one of the file permissions. Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Execute is only needed for files that will be executed (hence the name).

Do you get any errors in your error_log? //Daniel
 
>Do you get any errors in your error_log?

I do not see that there is an error_log file setup in my area. I have log files for webpage useage and statistics etc but I don't see anything that looks like an error log. I asked the server admin about this but have not heard back yet.
 
Hi,
Don't bother messing with permissions.
Triple check that the path to the .htpasswd file is correct, that's usually a common problem.

And yes the .htpasswd file and .htaccess file can be put in the same directory for testing.


É ::
 
I dont want you to give up looking here, but I was unable to make this work using Virtual Hosts.

If you remove them and use only the default server, it will work.

Just my two cents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top