问题描述
我想从我的本地网络服务器访问的Active Directory。要做到这一点,我使用XAMPP的最新版本,并呼吁PHP脚本。如果我理解正确的事情,我需要启用SSL访问https网址。我试图谷歌,但没有运气:(谁能链接教程或给我解释如何在XAMPP / Apache的安装SSL为Windows 7 64位的任何帮助将是AP preciated:?)
I'm trying to access a Active Directory from my local webserver. To do this I'm using the latest version of xampp and a PHP script called adLDAP. If I understand things right, I need to enable SSL to access https URLs. I've tried to google it but with no luck :( Could anyone link a tutorial or explain to me how to install SSL on xampp/apache for windows 7 64bit? Any help would be appreciated :)
推荐答案
Apache的一部分 - 使您可以打开
Apache part - enabling you to open https://localhost/xyz
有是配置文件XAMPP /阿帕奇/ conf目录/额外/的httpd-ssl.conf中包含所有SSL具体配置。这是相当有据可查的,所以有意见的读取,并采取看。
这些文件始于< IfModule ssl_module方式>
,所以只有当阿帕奇已经开始与它的mod_ssl模块有一个效果
There is the config file xampp/apache/conf/extra/httpd-ssl.conf which contains all the ssl specific configuration. It's fairly well documented, so have a read of the comments and take look at http://httpd.apache.org/docs/2.2/ssl/.The files starts with <IfModule ssl_module>
, so it only has an effect if the apache has been started with its mod_ssl module.
在编辑器中打开文件XAMPP /阿帕奇/ conf目录/ httpd.conf文件和搜索行
Open the file xampp/apache/conf/httpd.conf in an editor and search for the line
#LoadModule ssl_module modules/mod_ssl.so
删除hashmark,保存文件并重新启动Apache。 Web服务器现在应该与XAMPP的基本/默认SSL confguration启动;够用了测试,但你可能需要阅读了Apache文档更一点关于mod_ssl的。
remove the hashmark, save the file and re-start the apache. The webserver should now start with xampp's basic/default ssl confguration; good enough for testing but you might want to read up a bit more about mod_ssl in the apache documentation.
PHP的一部分 - 使adldap使用
PHP part - enabling adldap to use ldap over ssl
adldap需要PHP的OpenSSL的扩展使用SSL上LDAP连接。 OpenSSL的扩展船舶与XAMPP的DLL。你必须告诉PHP加载这个DLL,例如由具有扩展= nameofmodule.dll
在你的php.ini结果
运行
adldap needs php's openssl extension to use "ldap over ssl" connections. The openssl extension ships as a dll with xampp. You must "tell" php to load this dll, e.g. by having an extension=nameofmodule.dll
in your php.ini
Run
echo 'ini: ', get_cfg_var('cfg_file_path');
它应该显示哪些INI文件你的PHP安装使用(可在PHP的Apache模块和PHP的CLI版本之间的不同)。结果
在编辑器中打开此文件,然后搜索
It should show you which ini file your php installation uses (may differ between the php-apache-module and the php-cli version).
Open this file in an editor and search for
;extension=php_openssl.dll
删除分号,保存文件并重新启动Apache。
remove the semicolon, save the file and re-start the apache.
又见:http://docs.php.net/install.windows.extensions
这篇关于当地XAMPP / Apache服务器上设置SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!