Reputation: 185
I have hosted my MEAN project over aws ec2 (mean bitnami hvm) instance. It is running on port 3000 and I am able to access my instance in the following way:
ec2-xx-xx-xx-xx.amazonaws.com:3000
I want to access the instance without the port number (3000), i.e.: ec2-xx-xx-xx-xx.amazonaws.com
How can I do this?
Upvotes: 5
Views: 2310
Reputation: 14523
Run this port forward command on your EC2 instance.
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000
And your port 80 will be redirected to port 3000.
Upvotes: 7
Reputation:
Run your application on port 80 instead of port 3000, or run a proxy (like nginx
) that allows you to map ports and paths as needed.
Upvotes: 0