Articles in this section

Can't curl domain on Plesk: connect to 203.0.113.2 port 443 failed: Connection refused

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • curl fails to fetch a website hosted on Plesk when run from inside the server, but works from other locations

    curl https://example.com
    curl: (7) Failed to connect to example.com port 443: Connection refused

  • This domain points to an IP address in /etc/hosts

    127.0.0.1 localhost.localdomain localhost
    203.0.113.2 example.com

  • The IP address assigned to this domain in Domains > example.com > Hosting is different

Cause

The entry in /etc/hosts is routing requests to the wrong IP address.

Resolution

  1. Connect to the server via SSH

  2. Edit /etc/hosts

    # vi /etc/hosts

  3. Remove the domain's entry from /etc/hosts

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.