So we're building a web application in PHP and we're trying to make requests to an external API. Problem is that we're getting a curl error:
cURL error 7: Failed to connect to external.api.com port 443: No route to host
A little bit of background now.
- We're making requests using Guzzle.
- We're hosting on Apache, which is running on a Linux machine and we're also using SSL.
- The API is also using SSL, therefore the port 443 in error message.
- The HTTP requests include a certificate for authentication.
I've managed to get it running on two different development environments but not on the production one. I suspect the problem is in the configuration of Apache, as if we haven't made it available to make requests to certain IP or port. I have no idea how to check it. I've read that I might have to change the file /etc/network/interface yet I haven't found any info on what to write there.
I've also read I have to run $ netstat -rn
for answers yet I'm not sure what to look there.
EDIT:
Can't even make a simple get request without any parameters and anything. Yet I can make requests to https://google.com and https://facebook.com. Will write more in a few.