.htaccess - SOLVED!

Oaf357

Senior member
Sep 2, 2001
956
0
0
Does anyone have experience with .htaccess? If so please let me know I'm having some issues with setting up .htaccess on my web server. The syntax of the .htaccess file is correct, and I used the .htpasswd help at http://www.euronet.nl/~arnow/htpasswd/documentation.html to create the .htpasswd file. Everything appears to be in order, but whenever I try and login it keeps asking me for the password, everytime. I know I'm typing the password in correctly (I setup a test username and password of 12345 so I KNOW). Thanks in advance.
 

N11

Senior member
Mar 5, 2002
309
0
0
A common mistake is the permissions settings on the .htpasswd file. They need to be readable by the user apache is running as. So typically a permission setting of 644 (rw-r--r--) is what I recommend, somewhere in an isolated non web served location.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
Oh yea. I forgot to mention that I double-checked permissions and tried different directories as well.
 

N11

Senior member
Mar 5, 2002
309
0
0
Does it start to display some of the page and keep asking you for the login information?

Do you have varying .htaccess files in directories above this one in question?

Does your .htaccess file specify access for the user you added to the .htpasswd file?

edit: paste the contents of your .htaccess file if you don't mind.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
No, no, yes...

I deleted all instances of the file so it wouldn't be compromised.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
Thanks, Jack. But, I've already reviewed this info and everything seems to check out as it should.
 

N11

Senior member
Mar 5, 2002
309
0
0
Without seeing the .htaccess file or getting shell access to the system in question I can't really think of anything else to recommend.

What do the apache error logs say on the failed logins? This should tell you what the problem is.

the correct syntax to generate/re-write an htpasswd file is htpasswd -c /path/to/.htpasswd username
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
Originally posted by: N11
Without seeing the .htaccess file or getting shell access to the system in question I can't really think of anything else to recommend.

What do the apache error logs say on the failed logins? This should tell you what the problem is.

the correct syntax to generate/re-write an htpasswd file is htpasswd -c /path/to/.htpasswd username

See here is the deal. I don't have shell access to the server (Dixiesys). I'm using a text editor and an MD5 hash generator to create the .htpasswd file.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
AuthUserFile /home/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

<Limit GET>
require valid-user
</Limit>
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
[Sun Feb 23 14:00:44 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:00:44 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:00:54 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:00:54 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:13:00 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:13:00 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:13:03 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:13:03 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:13:06 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:13:06 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:14:36 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:14:36 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:14:40 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:14:40 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:14:52 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:14:52 2003] [error] [client 199.9.83.2] user chris not found: /dev/
[Sun Feb 23 14:15:03 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:15:03 2003] [error] [client 199.9.83.2] user chris not found: /dev/date.php
[Sun Feb 23 14:15:08 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:15:08 2003] [error] [client 199.9.83.2] user chris not found: /dev/date.php
[Sun Feb 23 14:16:13 2003] [error] [client 199.9.83.2] client denied by server configuration: /home/virtual/site63/fst/var/www/html/dev/.htaccess
[Sun Feb 23 14:19:23 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:19:23 2003] [error] [client 199.9.83.2] user test not found: /dev/myphpadmin
[Sun Feb 23 14:20:21 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:20:21 2003] [error] [client 199.9.83.2] user test not found: /dev/
[Sun Feb 23 14:20:26 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/.htpasswd
[Sun Feb 23 14:20:26 2003] [error] [client 199.9.83.2] user test not found: /dev/
[Sun Feb 23 14:23:26 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:23:26 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:23:30 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:23:30 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:43:51 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:43:51 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:43:54 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:43:54 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:43:57 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:43:57 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:43:59 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /home/admin/ht/.htpasswd
[Sun Feb 23 14:43:59 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 14:47:41 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/.htpasswd
[Sun Feb 23 14:47:41 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 15:04:18 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/user.htpasswd
[Sun Feb 23 15:04:18 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 15:04:22 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/user.htpasswd
[Sun Feb 23 15:04:22 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 15:04:26 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/user.htpasswd
[Sun Feb 23 15:04:26 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 15:05:11 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/user.htpasswd
[Sun Feb 23 15:05:11 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 15:05:13 2003] [error] [client 199.9.83.2] (2)No such file or directory: Could not open password file: /etc/httpd/user.htpasswd
[Sun Feb 23 15:05:13 2003] [error] [client 199.9.83.2] user test not found: /dev/phpinfo.php
[Sun Feb 23 16:13:35 2003] [alert] [client 199.9.83.2] /home/virtual/site63/fst/var/www/html/dev/.htaccess: Invalid command '&iuml;»¿AuthUserFile', perhaps mis-spelled or defined by a module not included in the server configuration
home/virtual/site63/fst/var/www/html/dev/.htaccess: Invalid command '&iuml;»¿AuthUserFile', perhaps mis-spelled or defined by a module not included in the server configuration
[Sun Feb 23 16:18:20 2003] [alert] [client 199.9.83.2] /home/virtual/site63/fst/var/www/html/dev/.htaccess: Invalid command '&iuml;»¿AuthUserFile', perhaps mis-spelled or defined by a module not included in the server configuration
[Sun Feb 23 16:22:05 2003] [alert] [client 199.9.83.2] /home/virtual/site63/fst/var/www/html/dev/.htaccess: Invalid command '&iuml;»¿AuthUserFile', perhaps mis-spelled or defined by a module not included in the server configuration
[Sun Feb 23 16:24:44 2003] [alert] [client 199.9.83.2] /home/virtual/site63/fst/var/www/html/dev/.htaccess: Invalid command '&iuml;»¿AuthUserFile', perhaps mis-spelled or defined by a module not included in the server configuration
 

N11

Senior member
Mar 5, 2002
309
0
0
Ok -- for obvious reasons I can't recommend anything else regarding your dixiesys account, I'm not in tune to their server configurations or methodologies -- I had assumed this was your web server.

I'd recommend discussing it with their support department, or another dixiesys user here might be able to assist you.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
Originally posted by: skyking
I'm curious as to what the answer is. Could you let us know?

I'm actively working with Dixiesys at this time. I will let you know the results of our labor.
 

dexter333

Senior member
Oct 9, 2000
442
0
0
Um, I don't think that path to .htpasswd is correct. Unless your web root dir is /home/, which is highly unlikely. Make sure that it refers to .htpasswd in YOUR directory. This is 0% their fault, heh.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
Originally posted by: dexter333
Um, I don't think that path to .htpasswd is correct. Unless your web root dir is /home/, which is highly unlikely. Make sure that it refers to .htpasswd in YOUR directory. This is 0% their fault, heh.

Considering at the time the .htpasswd was in the /home/ directory I think I was right.

Like I mentioned before I'm actively working with Dixiesys for a resolution to this problem. There hasn't been one yet after three hours.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
From Dixiesys:

RogelioH
2m ago

Just wanted to let you know that we havent forgotten about you, I have contacted an admin and it is up for review soon.
 

N11

Senior member
Mar 5, 2002
309
0
0
It shouldn't take them 3 hours to resolve a simple issue relating to an .htpasswd file.

You might try finding a host with a competent support department.
 

Oaf357

Senior member
Sep 2, 2001
956
0
0
There were actually quite a few problems.

1) Directory structure - Dixiesys at no time mentioned this but when they themselves had to finally sit down and create the .htaccess because they had no idea what the problem really was, they used the right path. Which probably had to do with my initial errors of .htpasswd not found.

2) Apparently Notepad threw some extra characters in (I probably saved the second attempt as UTF-8 as opposed to ANSI). Which would be a mistake on my part.

However, it took them 13 hours to find all this and they didn't even mention the whole path problem.