0

I was having issue with bringing up my angular app with node backend onto my local computer's browser after successfully having it up and running on EC2 instance. I have configured mmy security to allow traffic from port 4200 for angular and run ng serve with --host on the private IP as well as 0.0.0.0, but the issue persist, wondering what might caused the issue?

Here is my security config:

enter image description here

Also, here is the EC2 terminal output in which the angular app is hosted up successfully:

enter image description here

enter image description here

Does anyone have any advice on what can actually gone wrong? Thanks

Edit: I viewed the article before and attempts to use ng serve with --host 0.0.0.0, but it still does not work. But strangely, when I try port :80 it does connect to the ngnix web server I have on the EC2 instance on port 80, so that connect, but for the angular app on port 4200, it does not

Danny Shen
  • 53
  • 4
  • Does this answer your question? [How to allow access outside localhost](https://stackoverflow.com/questions/43492354/how-to-allow-access-outside-localhost) – Anon Coward Jan 15 '23 at 21:36
  • @AnonCoward Yeah I viewed that article before and attempts to use ng serve with --host 0.0.0.0, but it still does not work. But strangely, when I try port :80 it does connect to the ngnix web server I have on the EC2 instance on port 80, so that connect, but for the angular app on port 4200, it does not. – Danny Shen Jan 15 '23 at 21:49
  • Have you tried to run with the ```--disable-host-check true``` option? And use ```0.0.0.0``` as the host, you will anyway not be able to connect if you bind it to the private IP of the EC2 instance. – chamal Jan 16 '23 at 03:02

0 Answers0