https://github.com/larsks/so-example-1109463
https://github.com/larsks/so-example-1109463
example stackoverflow
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/larsks/so-example-1109463
- Owner: larsks
- Created: 2022-08-30T13:16:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T14:50:06.000Z (over 3 years ago)
- Last Synced: 2025-06-28T03:09:37.220Z (7 months ago)
- Topics: example, stackoverflow
- Language: HTML
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apache HTTPD and LDAP Authn/Authz
This repository accompanies my answer to .
If you `docker-compose up` this environment, you'll get three Apache instances:
- On port 8081, using `httpd/mod_ldap.conf.v1`
This is the original configuration and does not work.
- On port 8082, using `httpd/mod_ldap.conf.v2`
This replaces `Require ldap-user` with `Require user` and works.
- On port 8083, using `httpd/mod_ldap.conf.v3`
This does not use a provider alias and works.
To test these services, try to access the `/auth/` path with username `user1` and password `secret1`:
```
$ curl -u user1:secret http://localhost:8082/auth/
LDAP Auth Example
# LDAP Auth Example
Congratulations, you have successfully authenticated.
```
You can see the configuration for a specific server at the `/config` path:
```
$ curl http://localhost:8082/config
#
# - Using a provider alias
# - Uses "Require user" instead of "Require ldap-user"
AuthLDAPURL ldap://ldap/ou=users,dc=example,dc=com?cn
AuthLDAPBindDN uid=authreader,ou=system,dc=example,dc=com
AuthLDAPBindPassword secret
AuthName "LDAP"
AuthType Basic
AuthBasicProvider example
Require user user1
```