Help: Active Directory authentication for website

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Help: Active Directory authentication for website

Postby sportyones » 21. October 2010 15:10

Hi people,

I'm a first time user of Xampp and want to quickly deploy and test a solution. I am trying to protect the root of my intranet site using Microsoft Active Directory 2003. This will mean that visitors to the intranet site will need to provide their network logon to access the intranet pages. From what I understand I need to do two things to accomplish this:

1. enable LDAP by going to C:\xampp\php\php.ini and uncommenting extension=php_ldap.dll
2. create a .htaccess file in C:\xampp\htdocs

Here is what my .htaccess file looks like

Code: Select all
Order deny,allow
   Allow from all
   AuthBasicProvider ldap
   AuthzLDAPAuthoritative Off
   AuthLDAPURL
   ldap://domaincontroller:389/CN=Users,DC=location,DC=company,DC=com?sAMAccountName?sub?(objectClass=user)
   AuthLDAPBindDN cn=myusername,cn=Users,dc=location,dc=company,dc=com
   AuthLDAPBindPassword mypassword
   AuthType Basic
   AuthName "Protected"
   require valid-user



After doing this I try to browse to localhost and get this error message

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
21/10/2010 15:04:42
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1


Can anyone point out what I'm doing wrong. Thanks a lot for your time :)
sportyones
 
Posts: 2
Joined: 21. October 2010 14:39

Re: Help: Active Directory authentication for website

Postby Stepke-DSL » 21. October 2010 15:33

Hi,

You have to edit the httpd.conf file for .htaccess

Regards Stepke
Stepke-DSL
 
Posts: 313
Joined: 12. July 2007 16:08
Operating System: Win XP Pro SP3 + SuSe Linux

Re: Help: Active Directory authentication for website

Postby sportyones » 21. October 2010 17:23

Thanks for the quick reply Stepke-DSL :)

What line do I need to add/edit in the http.conf file? I have read up quite a bit about how to do this, but I'm still new to Xampp and I've been scratching my head over this problem.

Thanks for your patience.
sportyones
 
Posts: 2
Joined: 21. October 2010 14:39

Re: Help: Active Directory authentication for website

Postby JonB » 22. October 2010 01:02

I have the oddest feeling that the context names may need to be in CAPS to be parsed right - who knows - worth a shot.

i.e CN= DC= etc

Also - did you look in the apache errror log???

I'll be very inerested to see if this works correctly with XAMPP

I also think - Stepke may have been saying you need to add a AccessFileName directive to httpd.conf - but in XAMMP (I just found out answering another topic) its in /apache/extra/default-httpd.conf, so its not where you usually find it. (httpd.conf)

Good Luck
' :)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 73 guests