Web Hosting Talk







View Full Version : htaccess problems


psi
09-14-2002, 12:07 PM
I have no idea what has gone wrong with this machine, everything seems to be set-up just fine. It's a RaQ4 with an almost factory spec! Some people are talking of this problem on the Sun forum but with no answers.

The problem is that basic authentication doesn't work. It prompts for a password but never accepts it. There may also be a FrontPage problem that is related to htaccess.

access.conf contains "AllowOverride AuthConfig Indexes Limit"

The only change I have made recently is to install the correct patches and fix an SSL problem in httpd.conf.

To make the problem more confusing it works when you use "require group sitexx" instead of using and external password file.

This has got me stumped.

Anyone else with this problem?

CmptrWz
09-15-2002, 10:12 AM
I had that problem when I wasn't using a full path to the password file. Could that be your problem?

psi
09-15-2002, 10:19 AM
No. I have been using variations of the following:

AuthType Basic
AuthUserFile /home/sites/site101/users/web/tech_support/test/.htpasswd
AuthName "htaccess test"
require valid-user


Thanks for the reply.

bert
09-15-2002, 10:49 AM
Try changing AllowOverride in access.conf to:

AllowOverride All

Tha should do it for you. ;)

psi
09-15-2002, 10:56 AM
I think I have a already tried that with no luck

Isn't that a bit dangerous in a shared environment anyway?

Isn't "AllowOverride AuthConfig Indexes Limit" enought?

Thanks Burt.

bert
09-15-2002, 11:23 AM
Isn't that a bit dangerous in a shared environment anyway?

It is not as safe, but we have not had any problems with it.

Check for the following:

In your /etc/httpd/conf/access.conf file you should have the following entries among others:

<Directory />
Options None
AllowOverride All
AuthFailDelay 2000000
</Directory>

Options Indexes FollowSymLinks Includes MultiViews

AllowOverride AuthConfig Indexes Limit


In your /etc/httpd/conf/srm.conf file you should have the following:

AccessFileName .htaccess

Hope this helps :)

psi
09-15-2002, 04:15 PM
I'm using the same set-up as on another machine (a few differences nothing that should affect this).

It prompts for the password but won't accept the correct password.

All the file locations are OK and the password file was created using htpasswd.

Could the hash used to create the passwords changed... as you can see I'm stuck.

It works when you referred to a group but not a password file.

I'm going mad. :spiny: Thanks Bert.

bert
09-15-2002, 04:18 PM
Hmmm. Weird indeed, write a very simple .htaccess file for testing purposes, the file should be as follows:

order allow,deny
allow from all
require valid-user
Authname TEST
Authtype Basic
AuthUserFile /home/sites/sitename/.htpasswd

Then recreate your .htpassword file as follows:

/usr/bin/htpasswd -c /home/sites/sitename/.htpasswd test

Give it a password of 123 or something and try it. I know you might have already tried everything, but I just can't think of anything else unless I can access the box.

Good luck :)

psi
09-15-2002, 04:36 PM
It works!!

Yet I still don't know what was wrong. :nuts:

Whatever the case, thank you very much for your help Burt. :beer:

bert
09-15-2002, 04:39 PM
Glad to help :)

linuxphreak
09-16-2002, 06:03 PM
Hello I have been having problems very similar to these... ive tried everything in this post but when i try to access a .htaccess protected directory I get "page cannot be displayed" And I have tried everything short of unistalling the patch.... not too sure what that would do... patching the cobalt has been a very bad expeirence for me (something always breaks) so I am very hesitant to mess with them anymore... any help would be great... thanks in advance!!

Here is the link to the thread I started about this problem.

http://www.webhostingtalk.com/showthread.php?s=&threadid=72332

nate

bert
09-16-2002, 06:51 PM
Hey Nate, have you tried to uninstall the patch? Perhaps that should help ;)