I am running joomlatools-box and trying to execute curl on a https site which throws 503. If I try it on a http site it works perfectly. I suspect something is wrong in my ubuntu vagrant box or that a proxy is in the way but cannot really figure out how to resolve this.
Trying the following code does not work will result in 503 Service Unavailable:
$ch = curl_init('https://example.com');
curl_setopt($ch ,CURLOPT_RETURNTRANSFER,true);
$ret = curl_exec($ch);
curl_close($ch);
var_dump($ret);
die();
The code below works and returns the contents of the site:
$ch = curl_init('http://example.com');
curl_setopt($ch ,CURLOPT_RETURNTRANSFER,true);
$ret = curl_exec($ch);
curl_close($ch);
var_dump($ret);
die();
EDIT: Running php 7.2.27, curl version:
$ curl --version
curl 7.70.0-DEV (x86_64-pc-linux-gnu) libcurl/7.70.0-DEV OpenSSL/1.1.1d zlib/1.2.11 libssh2/1.9.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets