System Info
- Win 10 Pro x64
- PHP 7.3.10 x64 TS
- HTTPD 2.4.34
I've followed this guide to generate the necessary key and certificate files.
How do I allow HTTPS for Apache on localhost?
httpd.conf
LoadModule ssl_module modules/mod_ssl.so
extra/vhosts.conf
<IfModule ssl_module>
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile "${CONF_PATH}/certs/localhost.cert"
SSLCertificateKeyFile "${CONF_PATH}/certs/localhost.key"
...
</VirtualHost>
</IfModule>
php.ini
extension=openssl
[curl]
curl.cainfo="C:\bin\httpd\conf\certs\localhost.cert"
[openssl]
openssl.cafile="C:\bin\httpd\conf\certs\localhost.cert"
This is usually where people will say to copy libeay32
and ssleay32
but, just to document this for anyone else, these are no longer the files included with recent builds. They are libcrypto
and libssh
now. I copied those into the Apache bin directory.
Going to a page with phpinfo()
confirms these settings, with SSL marked as enabled.
Let's do some HTTPS requests.
pecl update-channels
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Channel "pear.php.net" is not responding over http://, failed with message: Connection to `ssl://pear.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
Trying channel "pear.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pear.php.net" (Connection to `ssl://pear.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
Well, that's no good. I saw some suggestions about removing an -n
flag from the PECL script. So I did that. Let's see if it's any different now.
pecl update-channels
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Channel "pear.php.net" is not responding over http://, failed with message: Connection to `ssl://pear.php.net:443' failed:
Trying channel "pear.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pear.php.net" (Connection to `ssl://pear.php.net:443' failed: )
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
No, that's actually worse. Now there's just less detail about why it's failing.
Anyone have any extra insight I'm missing here on why I'm not having any success?