I want to add port 8080
to EC2 security group to access tomcat. But whenever I select HTTP from drop down I get 80
port as default and also can't change it.
So how can I add 8080
so that I can access Tomcat publicly?
Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it drives traffic to the web server. However, users can not reserve port 8080 for secondary web servers.
You have to choose "Custom TCP rule" in the dropdown.
Then you will be able to change the port to 8080.
You have to able the port in two different sections: (1) Windows firewall, as it was explained before. (2) Directly in Amazon Web Service console, exactly in security groups/inbound.
after adding the rule in security group, you should also turn on the Linux os port in order to access your webservice command for doing that
sudo ufw allow 8080/tcp
Some Extra Information: Actually this is not a good why to deploy the service. we should rather use a reverse proxy server to handle all kind of requests (like nginx), and those request should be routed to specific web service in this why whole traffic will be routed to 80 port(HTTP) or 443 (HTTPS) if you want to configure SSL. Thus a lot of things become easier by using it. Follow this to know how to use Nginx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With