osixia / docker-phpLDAPadmin

phpLDAPadmin container image 🐳🌴
MIT License
844 stars 197 forks source link

Manage two or more Ldap Servers with one osixia/phpldapadmin #36

Closed marlinhares closed 6 years ago

marlinhares commented 6 years ago

Hi,

First, thanks for your ldap containers! We are using them in production with success since 03/2016 first in kubernetes and now in Rancher/Cattle.

We have a question, sorry if it is newbie. In phpldapadmin when we set PHPLDAPADMIN_LDAP_HOSTS=ldap-master, we manage our master. Are there any way I pass another ldap server, so we can manage two or more servers with the same phpldap admin? Something like: PHPLDAPADMIN_LDAP_HOSTS=ldap-master/ldap-slave...

d4lk0s commented 6 years ago

Hi Marlin. You will need to define the PHPLDAPADMIN_LDAP_HOSTS like this in your RC/Deployment/etc:

        - name: PHPLDAPADMIN_LDAP_HOSTS
          value: "#PYTHON2BASH:[{'ldap1.example.com': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=com'}]}]}, {'ldap2.example.com': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=com'}]}]}, {'ldap3.example.com': [{'server': [{'tls': True}]},{'login': [{'bind_id': 'cn=admin,dc=example,dc=com'}]}]}]"
marlinhares commented 6 years ago

Thank you @d4lk0s

pcampbell-avodaq commented 9 months ago

Hi @BertrandGouny, is this still the only acceptable approach, or would it be possible to define multiple servers in a config.php which then gets mounted as described here? Many thanks in advance.

pcampbell-avodaq commented 9 months ago

Hi @BertrandGouny, is this still the only acceptable approach, or would it be possible to define multiple servers in a config.php which then gets mounted as described here? Many thanks in advance.

Using the path given here solved my problem (in that the config.php got loaded, yay).

Looks like the readme needs to be updated.