我在Windows 10上运行php 7.1.10,到目前为止,如果我做php -m
我看到扩展名列表中的openssl,我复制libssh2.dll
, ssleay32.dll
, libeay32.dll
到apache/bin
和Windows/System32
重新启动apache
几次,但是OpenSSL仍然是禁用的。
我错过了configuration中的东西吗?
确保运行时间variablesOPENSSL_CONF被设置。
set OPENSSL_CONF=C:\Program Files\Apache Software Foundation\Apache2.4\conf\openssl.cnf
在httpd.conf中,你需要一些额外的行(如果有的话,删除#):
LoadModule ssl_module modules/mod_ssl.so
和
Include conf/extra/httpd-ssl.conf
确保在编辑httpd-ssl.conf文件时创build了OpenSSL证书。
证书的额外步骤
openssl req -new -out server.csr openssl rsa -in privkey.pem -out server.key openssl x509 -in server.csr -out server.cert -req -signkey server.key -days 365
然后将server.key和server.cert移动到conf文件夹。 (C:\ Program Files \ Apache Software Foundation \ Apache2.4 \ conf)