Problems restricting access to projects in Xampp

I've Xampp installed in windows 10, and serval projects which is accessible via web browsers and file browser in local network \machinenameorIP\projectXX etc.

I do have AD on-premise MS server 2019.

I would like only a few users can access certain projects(Like I do not want users to have access to test projects etc) I have restricted file browser access with properties of project sharing/advanced but I can't seem to find a way to restrict access to web-browse.

I'm hoping if someone has done something similar can guide me in the right direction, how to do it..?

Thanks in advanced :)


Solution 1:

For general information, you can check out Authentication and Authorization for Apache.

As you can see, there are several different modules, the one you need is mod_authnz_ldap. Again, there's great documentation for this module. You can enable it through a2enmod authnz_ldap

A complete example looks something like this

<Directory "/var/www/html/test">
    Options Indexes FollowSymlinks
    AuthType Basic
    AuthName "Apache LDAP"
    AuthBasicAuthoritative Off
    AuthBasicProvider ldap
    AuthLDAPURL "ldap://YOURLDAPSERVER/CN=Users,DC=mydomain,DC=local?sAMAccountName?sub?(objectClass=*)"
    AuthLDAPBindDN "[email protected]"
    AuthLDAPBindPassword safepassword123
    Require valid-user
</Directory>

Apache's documentation describes a slightly different way to access AD, namely by going through the global catalog. This also allows for an AD tree to have multiple domains. Port 3269 if you're using SSL encryption.

AuthLDAPURL ldap://YOURLDAPSERVER:3268/?userPrincipalName?sub