0

I have a EC2 instance and my security Inbound rules setting is like this

Image of Inbound security rules

On my port 80 I am running my python app and on port 3000 I want to run my Angular/react app. how can I do this ? like my IP is 1*...188 and I am running python app 1*...188:80/admin now I want to run my angular/react app like this 1*...188:3000/react I have added 3000 port in inbound rules

Tousif
  • 50
  • 1
  • 12

1 Answers1

1

Security rules are only firewall to allow access to a port from a specified IP or anywhere. Adding a rule in security group does not make your application to listen on a certain port. If you are using webserver(s) for both of your application and are listening on the port 3000 and port 80 then you should be able to hit them using the public IP or domain name.

Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136
  • Thanks for reply sir. Can you mention how I can setup web server for port 3000 ? Any help would be highly appreciated . – Tousif Dec 09 '19 at 07:27
  • Like for 80 I connect using ssh and by default I think it connects with port 80 – Tousif Dec 09 '19 at 07:28
  • For your angular/react app, you can use a node server, which is generally part of the application package that you create. For example if you create a react app using create-react-app utility then it creates an application for you with built in web server which listens on port 300o by default. – Juned Ahsan Dec 09 '19 at 07:29
  • 1
    @Tousif No, ssh port is 22 and not 80. Port 80 is generally a web server port like nginx or apache, etc. – Juned Ahsan Dec 09 '19 at 07:30
  • where I have to run this command create-react-app ? So that it will create its instance on 3000 – Tousif Dec 09 '19 at 07:30
  • I still didn't get where I have to create react app actually. After connecting to ssh ? – Tousif Dec 09 '19 at 07:32
  • I know about all these. I have a final webapp deployed on heruko .and on EC2 I have django app running on port 80 with apache. My question is just How I can move that react app on EC2 port 3000. I think I am confusing you in my question. I have installed React on Heruko already just wanted to shift it on 3000 port on EC2 instance – Tousif Dec 09 '19 at 07:36
  • Then check this post : https://stackoverflow.com/questions/28706180/setting-the-port-for-node-js-server-on-heroku – Juned Ahsan Dec 09 '19 at 07:46