2

So I've registered a domain name www.abc.com that points to my EC2 instance 1.2.3.4

On this EC2 instance I've a Tomcat application called my-application. I can access the application via invoking http://1.2.3.4/my-application

I've configured www.abc.com to point to 1.2.3.4

But now how do I configure it to redirect to http://1.2.3.4/my-application instead?

What concept does this involve?

DJ180
  • 18,724
  • 21
  • 66
  • 117

1 Answers1

1

It's not EC2 issue, please specify your tomcat to show my-application as the welcome-page. See below:

After that, you can publish your application on http://1.2.3.4:8080/my-application.

Then, you need to redirect http://1.2.3.4:80 to http://1.2.3.4:8080/my-application

There are two methods:

  • Use Reverse Proxy (ex: Use nginx or apache web server as proxy)
  • Use AWS Application Load Balancing (if you use this pattern, you need to configure A record for Route53. From my wildly guessing, you already configure CNAME for Route53.)
hiropon
  • 1,675
  • 2
  • 18
  • 41