1 Answer
- Newest
- Most votes
- Most comments
0
Access on localhost also appears to be failing.
Is the web server running in EC2?
Run the following command to find the process listening on port 80.
sudo lsof -i :80
If nothing is displayed, start the web server.
Relevant content
- asked 6 months ago
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 months ago
I'm not sure where exactly should i run this command. Tryed this in EC2 Instance Connect, nothing happend. Then i executed 'npm run start' and tryed again, and still nothing.
This command is executed on the EC2 that is used as the backend. How do you envision accessing the back-end application? If you use HTTP as the protocol, you would need to start a web server.
Well, this is exaxtly what i did.
If you run this command and nothing is displayed, it is likely that the web server is not running on EC2. We are not sure which web server you are using on your EC2, but we will describe an example for Nginx. The following is an example command to start Nginx. This command must be changed depending on the web server installed on your EC2.
I'm not using Nginx/Apace/etc on my backend project. I only have Express and Cors libraries installed and configured to listen requests. Is this not enough? Should i try Nginx?