Symptoms
-
Scheduled tasks fail with the following error messages:
curl error 7 failed to connect to example.com port 443 connection refused
-
Attempt to connect to the website fails. For instance, with the following command:
# wget http://www.example/
--2020-07-07 07:17:07-- http://www.example/
Resolving www.example.com (www.example.com)... 127.0.0.1
Connecting to www.example.com (www.example.com)|127.0.0.1|:443... failed: Connection refused. -
On the network interface, the internal 192.0.2.2 IP address is used and the domain
example.com
resolves to external 203.0.113.2 IP address
Cause
Incorrect NAT configuration.
Resolution
Contact the hosting provider responsible for network/NAT configuration and report the issue to them to make it possible to connect to websites' own public IP from the server itself.
Modify the hosts
file:
For Plesk on Linux:
-
Connect to the server via SSH
-
Make a backup of the
/etc/hosts
file:# cp -a /etc/hosts{,.bak}
-
Edit file and add the following record:
192.0.2.2 www.example.com example.com
For Plesk on Windows:
-
Connect to the server via RDP
-
Create a backup of file
C:\Windows\System32\drivers\etc\hosts
-
Open file
C:\Windows\System32\drivers\etc\hosts
with a texteditor started as administrator -
Add the following line and save the file:
192.0.2.2 www.example.com example.com
Comments
0 comments
Please sign in to leave a comment.