Windows – OpenSSL not enabled on apache 2.4 Windows 10

apache-2.4php7windows

I'm running php 7.1.10 on windows 10, so far if I do php -m I see openssl in extensions list, I copied libssh2.dll, ssleay32.dll, libeay32.dll to apache/bin and Windows/System32 restarted apache several times, but OpenSSL is still disabled.

Did I miss something in configuration?

Best Answer

Make sure the run time variable OPENSSL_CONF is set.

set OPENSSL_CONF=C:\Program Files\Apache Software Foundation\Apache2.4\conf\openssl.cnf

In the httpd.conf you would need some extra line (remove the # if it's there):

LoadModule ssl_module modules/mod_ssl.so

and

Include conf/extra/httpd-ssl.conf 

Be sure you have created your OpenSSL certificate when you will edit the httpd-ssl.conf file.

Extra step for the certificate

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

And you move the server.key and server.cert to the conf folder. (C:\Program Files\Apache Software Foundation\Apache2.4\conf)

Related Topic