Hi, folks. I'm running into a very strange problem.
I've got the public_html folders of two home directories that I'm using .htaccess to protect. If I access them via any one of our virtual hosts running on this box ( they both work fine. However, if I access them using the machine name (ie. my-machine-05.mydomain.com/~username) one works and the other does not.
Since these are user accounts, not virtual servers, I'm suspecting the problem lies somewhere in the permissions or something, and not in the configuration file, since if it was in the config, I assume it would be a problem for both.
Both directories are found at /home/{username}/public_html/. In the exaamples below where I list directory contents, I'm eliminating everything other than the directories in question.
For the user home directories:
[webmstr@mydomain home]$ ls -l
drwx--x--x 12 pablo pablo 4096 Apr 6 09:12 pablo
drwx--x--x 13 webmstr webmstr 4096 Apr 6 09:25 webmstr
So as you can see, the permissions on the home directories are the same.
For the public_html directories:
[webmstr@mydomain home]$ ls -l
drwxr-xr-x 2 webmstr webmstr 4096 Apr 5 16:15 public_html
and
[pablo@mydomain pablo]$ ls -l
drwxr-xr-x 2 pablo pablo 4096 Apr 6 09:11 public_html
and after that, the .htaccess files:
[webmstr@mydomain webmstr]$ ls -la public_html/
-rw-rw-r-- 1 webmstr webmstr 96 Mar 29 19:21 .htaccess
[pablo@mydomain pablo]$ ls -la public_html/
-rw-rw-r-- 1 pablo pablo 92 Apr 6 09:11 .htaccess
the contents of which are:
Webmstr .htaccess file:
AuthUserFile /home/webmstr/password
AuthName "Work Related"
AuthType Basic
require user webmstr
Pablo .htaccess file:
AuthUserFile /home/pablo/password
AuthName "Work Related"
AuthType Basic
require user pablo
So as you can see, everything seems to be the same. To me at least.
As I said above if I access them via any one of our virtual hosts running on this box (ie. they both work fine.
However, if I access them using the machine name (ie. my-machine-05.mydomain.com/~username) I get prompted to enter my un/pw for the pablo account, but not for the webmstr account.
Can anyone out there provide any insight to this? I'm by no means an expert on Apache, but I am quick study, very competent and can usually identify problems pretty quickly, however this one has me stumped.
Cheers and TIA.
Pablo
I've got the public_html folders of two home directories that I'm using .htaccess to protect. If I access them via any one of our virtual hosts running on this box ( they both work fine. However, if I access them using the machine name (ie. my-machine-05.mydomain.com/~username) one works and the other does not.
Since these are user accounts, not virtual servers, I'm suspecting the problem lies somewhere in the permissions or something, and not in the configuration file, since if it was in the config, I assume it would be a problem for both.
Both directories are found at /home/{username}/public_html/. In the exaamples below where I list directory contents, I'm eliminating everything other than the directories in question.
For the user home directories:
[webmstr@mydomain home]$ ls -l
drwx--x--x 12 pablo pablo 4096 Apr 6 09:12 pablo
drwx--x--x 13 webmstr webmstr 4096 Apr 6 09:25 webmstr
So as you can see, the permissions on the home directories are the same.
For the public_html directories:
[webmstr@mydomain home]$ ls -l
drwxr-xr-x 2 webmstr webmstr 4096 Apr 5 16:15 public_html
and
[pablo@mydomain pablo]$ ls -l
drwxr-xr-x 2 pablo pablo 4096 Apr 6 09:11 public_html
and after that, the .htaccess files:
[webmstr@mydomain webmstr]$ ls -la public_html/
-rw-rw-r-- 1 webmstr webmstr 96 Mar 29 19:21 .htaccess
[pablo@mydomain pablo]$ ls -la public_html/
-rw-rw-r-- 1 pablo pablo 92 Apr 6 09:11 .htaccess
the contents of which are:
Webmstr .htaccess file:
AuthUserFile /home/webmstr/password
AuthName "Work Related"
AuthType Basic
require user webmstr
Pablo .htaccess file:
AuthUserFile /home/pablo/password
AuthName "Work Related"
AuthType Basic
require user pablo
So as you can see, everything seems to be the same. To me at least.
As I said above if I access them via any one of our virtual hosts running on this box (ie. they both work fine.
However, if I access them using the machine name (ie. my-machine-05.mydomain.com/~username) I get prompted to enter my un/pw for the pablo account, but not for the webmstr account.
Can anyone out there provide any insight to this? I'm by no means an expert on Apache, but I am quick study, very competent and can usually identify problems pretty quickly, however this one has me stumped.
Cheers and TIA.
Pablo