cURL error 7: Failed to connect to port 443: Connection refused


I’ve searched the forum and notice people having similar issues. Essentially cURL isn’t working when my site is configured with https.

I’ve tried the suggestions here to no avail:

Is there not a solution besides disabling https? I want keep this enabled because this is what I will use in production.
I need to get Nginx to listen on port 443 in my docker VM. I believe that will fix it.

This article help me fixed the issue. I added the line to the host file according to the steps provided and it fixed my 443 issue I was having.


I followed that same article which didn’t resolve it. Everytime the server would reboot, the host file would clear of that IP address. I am going to migrate back to Apache to see if that fixes it.

Same happens to me. It would be cool if we can make a “persistent” entry on that hosts file for every site. Not the best but would be a helpful workaround…

Hi Mcveyb

Can you please tell me exactly what you have added to the host file and my url is something like this https://proxy/authn/myConjurAccount/host%2FBotApp%2FmyDemoApp/authenticate .
Should i be giving the IP address 172.X.X.X and this url ?