?
Solved

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

Posted on 2007-07-30
4
Medium Priority
?
2,879 Views
Last Modified: 2008-05-02
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
0
Comment
Question by:shang3000
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 19599678
> 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
 

Author Comment

by:shang3000
ID: 19608092
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
 
LVL 27

Accepted Solution

by:
Nopius earned 2000 total points
ID: 19608182
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
 

Author Comment

by:shang3000
ID: 19615106
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

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question