- Newest
- Most votes
- Most comments
Hello Dear Customer,
It seems like your EC2 Instance doesn’t have the capability to connect to a remote server, that is why when you try to run the scripts locally, they work but not through your instance in the cloud. You need to make sure, your EC2 instance can talk to remote servers on the internet, either through giving the instance itself a Public IP address or by using a NAT gateway. Additionally, you can also utilize the LFTP tool in order to determine what is causing the connection failure. You can use the debug option -T or -o when connecting to your ftp server though the command line. Here are some resources you can utilize. Hope they will be of help.
Resources:
https://aws.amazon.com/premiumsupport/knowledge-center/nat-gateway-vpc-private-subnet/
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html
Relevant content
- asked a year ago
- asked 7 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
I'm sorry, I'm not following your question... So your PHP script is running on EC2 and attempting to cURL to some remote server on port 990 and ports 50000-50010 to download files. This script works locally and on another production server, but not on your EC2 instance, correct? Are other sites accessible from your EC2 instance (meaning your EC2 instance can access the internet)?