DNS mapping in Tomcat7

I have a domain myapp.infoand an instance of Tomcat7.

Now I want to configure Tomcat 7 so that instead of entering a URL such as http://AAA.BBB.CCC.DDD:8080/myapp-webI can use the URL, for example http://web.myapp.info(and instead http://AAA.BBB.CCC.DDD:8080/probe/use probe.myapp.info).

To make it work, I need to do three things:

  • Make sure that when the user enters the URL myapp.info, he is redirected to AAA.BBB.CCC.DDD.
  • Configure Tomcat7 subdomain mappings.
  • Change the port of the HTTP connector.

How can i do this?

Update 1: Note that there is currently no relationship between the domain myapp.infoand the Tomcat instance. I bought a domain, but it is not configured to be serviced by a Tomcat instance (so I need to establish this connection as well).

+4
source share
2 answers

I think you should use Apache Server (or equivalent, for example lighttpd , NGINX , f5 , etc.) for port forwarding in the domain / subdomains. You can configure Apache as indicated in:

Apache Tomcat 7 - HOW-TO Proxy Support

or you can inspire:

Map a subdomain to a servlet context using Apache 2.x and Tomcat 6.x

+2
source

Set your Tomcat monitoring port to 80. This is the default port when the port is not specified in the URL.

And make your app a standard app

Installing the default application in tomcat 7

:: IP- , tomcat.

0

All Articles