Php apache2 debian safe上的ssl,没有用于cURL设置的公共认可CA

Php apache2 debian safe上的ssl,没有用于cURL设置的公共认可CA,php,apache,ssl,curl,Php,Apache,Ssl,Curl,我有两台服务器,A和B。它们都运行在相同的代码库上,并且运行在带apache2的debian上 我需要安全地定期检查serverA和serverB的REST响应 我已经构建了一个简单的cURL脚本,用basic auth从serverB连接到serverA: <?php $url = 'http://mydomain/restpath/get'; $ch = curl_init($url); $username = 'username'; $password = 'password'; /

我有两台服务器,A和B。它们都运行在相同的代码库上,并且运行在带apache2的debian上

我需要安全地定期检查serverA和serverB的REST响应

我已经构建了一个简单的cURL脚本,用basic auth从serverB连接到serverA:

<?php
$url = 'http://mydomain/restpath/get';
$ch = curl_init($url);
$username = 'username';
$password = 'password';
// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
// Include header in result? (0 = yes, 1 = no)
curl_setopt($ch, CURLOPT_HEADER, 0 );
// Should cURL return or print out the data? (true = return, false = print)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//set the basic auth to any then set the creds
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);   //get status code
// Download the given URL, and return output
$output = curl_exec($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
还是我还需要做更多的事

谢谢,
John在写问题时意识到正确的问题应该是什么,并且已经在这里得到了回答:

SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key