Plesk

Unable to cURL website hosted in Plesk: connect to 203.0.113.2 port 443 failed: Connection refused

Symptoms

Cause

This behavior is expected because nginx on Plesk is serving the hosted domains from the IP address set in Domains > example.com > Web Hosting Access instead of the one set in /etc/hosts file.

Resolution

  1. Connect to the server via SSH.

  2. Remove or comment out the line 203.0.113.2 example.com in /etc/hosts
    or use custom configuration templates to make nginx listen on all IP addresses.

Note: custom configuration templates will affect all the websites on the server.