@mattschaer Thanks for the suggestion. Java is not installed on the DF Ubuntu VM by default. I installed JRE 1.7, but it didn't make a difference.
Running curl_error($ch)
gives the following information:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
In the Apache Error Log there was this message: localhost:443 does NOT include an ID which matches the server name
This all points to an SSL certificate issue according to various posts on the internet. We created a self-signed certificate, but still get the same error messages.