[英]Active Directory on local server and intranet on external server
I have a local Active Directory server and a external web server where my intranet is located. 我的Intranet位于本地Active Directory服务器和外部Web服务器。
$ad = ldap_connect("ldap://ip-address") or die("Couldn't connect to AD!");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind( $ad, "user@domain", "password") or die("Can't bind to server.");
When I run this on a local web server it succesfully binds the connection. 当我在本地Web服务器上运行它时,它成功绑定了连接。 If I run the same code on the external server its unable to bind the ldap connection. 如果我在外部服务器上运行相同的代码,则无法绑定ldap连接。 Both port 389 and 636 is open on the AD server. 端口389和636在AD服务器上均打开。
I've tried google for an answer, but all the tutorials is for Active Directory and webserver on the same server. 我已经尝试过谷歌的答案,但所有教程都是针对同一服务器上的Active Directory和Web服务器。 Is this even possible? 这有可能吗?
Regarding LDAPS, this is often related to an invalid ssl certificate. 关于LDAPS,这通常与无效的ssl证书有关。 A workaround for that is described here: LDAP and PHP connection failure 此处描述了一种解决方法: LDAP和PHP连接失败
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.