Closed zWingz closed 6 years ago
@zWingz , wondering how you fix it? I got the same issue..............
I ran it by:
docker run -p 6443:443 \
--env PHPLDAPADMIN_LDAP_HOSTS=localhost \
--detach osixia/phpldapadmin:0.7.1
Appreciate it in advance :)
@keenkit confirm PHPLDAPADMIN_LDAP_HOSTS is right
Thanks @zWingz .. It works by By running the script:
#!/bin/bash -e
docker run --name ldap-service --hostname ldap-service --detach osixia/openldap:1.2.1
docker run --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.7.1
PHPLDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" phpldapadmin-service)
echo "Go to: https://$PHPLDAP_IP"
echo "Login DN: cn=admin,dc=example,dc=org"
echo "Password: admin"
I got
Go to: https://172.17.0.4
Login DN: cn=admin,dc=example,dc=org
Password: admin
which is good!
Not sure how you fixed it?
docker run -p 6443:443 \
--env PHPLDAPADMIN_LDAP_HOSTS=localhost \
--detach osixia/phpldapadmin:0.7.1
the script only start the phpAdminServer,
but the ldap server is not running.
you need to start the LDAP SERVER
at first
and use PHPLDAPADMIN_LDAP_HOSTS
connect to LDAP SERVER
yes.. True, need to start LDAP SERVER first. Did you start up ldap server simply by:
docker run --name my-openldap-container --detach osixia/openldap:1.2.1
which is indicated in the https://github.com/osixia/docker-openldap#quick-start ?
I had some problem,but I changed the script that the introduce give . and it works well
docker run -p 389:389 -p 636:636 --name ldap-service --hostname ldap-service -v '/Users/su/tmp/openldap/database:/var/lib/ldap' -v '/Users/su/tmp/openldap/config:/etc/ldap/slapd.d' --detach osixia/openldap:1.2.4 docker run -p 6443:443 --name phpldapadmin-service --hostname phpldapadmin-service --link ldap-service:ldap-host --env PHPLDAPADMIN_LDAP_HOSTS=ldap-host --detach osixia/phpldapadmin:0.8.0
echo "Go to: https://localhost:6443/" echo "Login DN: cn=admin,dc=example,dc=org" echo "Password: admin"
In my case it was the host computer firewall. The two docker container (openldap and phpldapadmin) can ping each other, but can not see any other port. Turning off firewall solved this problem. (Better is you configure firewall)
I face the same problem,and I solve it with your solutions. "--link ldap-service:ldap-host and PHPLDAPADMIN_LDAP_HOSTS = ldap-host. If your problem is not caused by firewall or ldap didn't start at first etc. I guess your problem is the same as mine. And by the way I didn't create a new network for this, I use the existing network.
I face the same problem,and I solve it with your solutions. "--link ldap-service:ldap-host and PHPLDAPADMIN_LDAP_HOSTS = ldap-host. If your problem is not caused by firewall or ldap didn't start at first etc. I guess your problem is the same as mine. And by the way I didn't create a new network for this, I use the existing network.
Thanks every much~This resolve my problem @xu20160924
Login DN: cn=admin,dc=example,dc=org (cn=admin,dc=ldap,dc=example,dc=org) password: admin
Response: Unable to connect to LDAP server ldap.example.com
Error: Can't contact LDAP server (-1) for user Failed to Authenticate to server Invalid Username or Password.