problem in apache configuration using .htaccess file with conflict in using the original apache and the xampp

hi all I'm trying to make password access protection to virtual host by name  in the .htaccess when I refer to this line
AuthUserFile      /etc/httpd/conf/ss-auth
authentication works just fine
but when I refer to this line instead
AuthUserFile      /home/hatem/cc/ss-auth
it fails to make authorization
and in the /var/log/httpd/error_log I find a message that say
[Mon Jul 30 17:22:36 2007] [error] [client 127.0.0.1] access to /xampp/ failed, reason: verification of user id 'gamal' not configured
first question is how can I solve that issue



second question is :
I have apache installed with fedora 6 and I installed xampp 1.6 and xampp starts by default now I turned it off and I started the original apache using this command :
# system-config-services
there is strange thing that happens it makes authentication then when it fails as described it refere the browser to ss.com/xampp
which is the protected directory of the admin interface of xampp that I've just turned it of I tryed
service httpd restart
and
service httpd reload
but no good
can you please help me in that too?
Best Regards
HG
shang3000Asked:
Who is Participating?
 
NopiusCommented:
Your first problem is here:
drwx------ 50 hatem hatem 4096 Aug  1 14:09 /home/hatem

Your home directory (where authentication file is located) is not readable by apache user. You may add apache user to the hatem group (/etc/group, change "hatem" line to the hatem:x:apache,nobody) and then allow group to read and execute (chmod g+r,g+x /home/hatem)


> when the original httpd service which can be started from the command
system-config-services
is marked to start when booting xampp does not start

That may happen when standard apache and your installed server try to bind to the same port (80). So you cannot run two servers on the same port. You should start only one.

> that what I'm asking about but in the xampp starting scenarion I think because I'm giving wrong user name/password

I guess the problem is in directory permissions. Not in wrong username and password.
0
 
NopiusCommented:
> AuthUserFile      /home/hatem/cc/ss-auth
> it fails to make authorization

> first question is how can I solve that issue

Probably apache user (nobody) have no access to the content of directory /home/hatem/cc/

please provide the output of:
ls -ald /home /home/hatem /home/hatem/cc


> there is strange thing that happens it makes authentication then when it fails as described it refere the browser to ss.com/xampp
which is the protected directory
> can you please help me in that too?

Probably yes, if you describe your problem in more details. What do you expect to get? Why authentication fails? And what do you mean by "refer browser to ss.com/xampp"?
0
 
shang3000Author Commented:
hi Nopius,

>>>please provide the output of:
>>>ls -ald /home /home/hatem /home/hatem/cc

[hatem@localhost ~]$ ls -ald /home /home/hatem /home/hatem/cc
drwxr-xr-x  3 root  root  4096 Jul  7 15:34 /home
drwx------ 50 hatem hatem 4096 Aug  1 14:09 /home/hatem
drwxr-xr-x  2 hatem hatem 4096 Jul 28 19:49 /home/hatem/cc
[hatem@localhost ~]$

>>> there is strange thing that happens it makes authentication then when it fails as described it
>>> refere the browser to ss.com/xampp
>>>which is the protected directory
>>> can you please help me in that too?

>>Probably yes, if you describe your problem in more details.
I have two apache servers on the machine one is the default package installed by default with fedora core 6
the other is the xampp package which is you can get from apachefriends.org
xampp starts by default I putted it's starting command in the rc.local file
when the original httpd service which can be started from the command
system-config-services
is marked to start when booting xampp does not start and only the fail of the authentication is happend and I don't know why
but when the service is marked not to start by default the xampp start and that scenario happens even if i stopped xampp manaully and started the httpd service(the original one) manually  that scenario is still repitetive

>> What do you expect to get?
I expect when I'm stopping xampp not to be redirected when authorization fails to ss.com/xampp you see the /xampp directory is under the xampp document root /opt/lampp/htdocs not under /ss virtualhost which I just added

>>Why authentication fails?
that what I'm asking about but in the xampp starting scenarion I think because I'm giving wrong user name/password

>>And what do you mean by "refer browser to ss.com/xampp"?
I mean that the browser is redirected to ss.com/xampp

I hope you can help me in that issue
best regards
HG





0
 
shang3000Author Commented:
hi Nopius,
thanks alot for your help


>>>Your home directory (where authentication file is located) is not readable by apache user. You may add apache user to the hatem
>>>group (/etc/group, change "hatem" line to the hatem:x:apache,nobody) and then allow group to read and execute
>>>(chmod g+r,g+x /home/hatem)
problem have been solved

for the other problem I tried restart and it disapeared

best regards
HG
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.