{"id":27304393,"url":"https://github.com/larsks/so-example-1109463","last_synced_at":"2026-02-04T17:33:17.727Z","repository":{"id":66821285,"uuid":"530664953","full_name":"larsks/so-example-1109463","owner":"larsks","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-30T14:50:06.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-28T03:09:37.220Z","etag":null,"topics":["example","stackoverflow"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/larsks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-30T13:16:06.000Z","updated_at":"2023-09-01T13:06:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"017ed0a3-3d11-48b3-a118-efc993e7fad2","html_url":"https://github.com/larsks/so-example-1109463","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/larsks/so-example-1109463","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsks%2Fso-example-1109463","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsks%2Fso-example-1109463/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsks%2Fso-example-1109463/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsks%2Fso-example-1109463/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larsks","download_url":"https://codeload.github.com/larsks/so-example-1109463/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsks%2Fso-example-1109463/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263208050,"owners_count":23430675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","stackoverflow"],"created_at":"2025-04-12T03:24:43.615Z","updated_at":"2026-02-04T17:33:12.706Z","avatar_url":"https://github.com/larsks.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache HTTPD and LDAP Authn/Authz\n\nThis repository accompanies my answer to \u003chttps://serverfault.com/questions/1109463/apache2-openldap-authorization-fails-using-ldap-user/1109472\u003e.\n\nIf you `docker-compose up` this environment, you'll get three Apache instances:\n\n- On port 8081, using `httpd/mod_ldap.conf.v1`\n\n  This is the original configuration and does not work.\n\n- On port 8082, using `httpd/mod_ldap.conf.v2`\n\n  This replaces `Require ldap-user` with `Require user` and works.\n\n- On port 8083, using `httpd/mod_ldap.conf.v3`\n\n  This does not use a provider alias and works.\n\nTo test these services, try to access the `/auth/` path with username `user1` and password `secret1`:\n\n```\n$ curl -u user1:secret http://localhost:8082/auth/\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eLDAP Auth Example\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    # LDAP Auth Example\n\n    Congratulations, you have successfully authenticated.\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nYou can see the configuration for a specific server at the `/config` path:\n\n```\n$ curl http://localhost:8082/config\n#\n# - Using a provider alias\n# - Uses \"Require user\" instead of \"Require ldap-user\"\n\n\u003cAuthnProviderAlias ldap example\u003e\n  AuthLDAPURL ldap://ldap/ou=users,dc=example,dc=com?cn\n  AuthLDAPBindDN uid=authreader,ou=system,dc=example,dc=com\n  AuthLDAPBindPassword secret\n\u003c/AuthnProviderAlias\u003e\n\n\u003cLocation \"/auth\"\u003e\n  AuthName \"LDAP\"\n  AuthType Basic\n  AuthBasicProvider example\n  Require user user1\n\u003c/Location\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsks%2Fso-example-1109463","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarsks%2Fso-example-1109463","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsks%2Fso-example-1109463/lists"}