LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-09-2014, 09:42 AM   #1
anas_lko
LQ Newbie
 
Registered: Jan 2012
Posts: 19

Rep: Reputation: Disabled
Angry Not be able to apply htdigest authentication in apache


Please resolve my issue im trying to apply htdigest in rhel 5 with the given configuration but im not be able to login via digest authentication.

configured in "/etc/httpd/conf/httpd.conf"
<VirtualHost 192.168.0.8:80>
ServerAdmin webmaster@example.com
DocumentRoot /var/www/html/server1
ServerName server1.example.com
ErrorLog logs/server1.example.com-error_log
CustomLog logs/server1.example.com-access_log common
<Directory "/var/www/html/server1">
AuthType Digest
AuthName "Server1 Member Access Directory"
AuthDigestDomain http://server1.example.com
AuthUserFile /var/www/html/server1/.htdigest
Require user mark
</Directory>
</VirtualHost>

after that given the command to add user mark into the digest file
[root@server1 ~]# htdigest -c /var/www/html/server1/.htdigest 'server1' mark
then change the ownership of the file ".htdigest"
[root@server1 ~]# chown apache:apache /var/www/html/server1/.htdigest

when im trying to open the webpage server1.example.com its saying "A username and password are being requested by http://server1.example.com. The site says: "Server1 Member Access Directory""
please help me to resolve this issue..

Thanks
 
Old 01-09-2014, 03:23 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi


I'm not sure about that "AuthDigestDomain".
You put...
http://server1.example.com"
...but I'm always using...
/
...for all domains and their subdomains and it works... .

And: if you do a "ps -Af" and look for the "apache2" process, do you really see it running as the "apache" user?

Bye
 
Old 01-09-2014, 03:32 PM   #3
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Off course you can't log in .. Your Realm's does not match

For:
Code:
AuthName "Server1 Member Access Directory"
You should run a command like:
Code:
htdigest -c /var/www/html/server1/.htdigest 'Server1 Member Access Directory' mark
 
Old 01-09-2014, 04:04 PM   #4
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Aha - yes, Smekey_justme is 200% correct.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Steps to apply the Patch Apache rajaniyer123 Solaris / OpenSolaris 24 04-01-2012 08:16 AM
apache authentication 70mas Linux - Software 1 03-23-2007 06:58 AM
Apache Authentication AgentRn007 Linux - Software 2 03-27-2003 06:50 PM
apache authentication plisken Linux - Software 3 02-28-2003 12:00 AM
apache authentication d-rez Linux - Security 1 05-30-2002 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration