4

I have a domain myapp.info and a Tomcat7 instance.

Now I want to configure Tomcat 7 so that instead of entering a URL like http://AAA.BBB.CCC.DDD:8080/myapp-web I will be able to use URL like http://web.myapp.info (and instead of http://AAA.BBB.CCC.DDD:8080/probe/ use probe.myapp.info).

In order to make it work, I need to do three things:

  1. Make sure that when the user enters the myapp.info URL, he is directed to AAA.BBB.CCC.DDD.
  2. Setup Tomcat7 subdomains mappings.
  3. Change the port of the HTTP connector.

How can I do it?

Update 1: Please note that at the moment there is no connection between the domain myapp.info and the Tomcat instance. I have bought the domain, but it is not configured to be served by the Tomcat instance (so I need to make that connection, too).

Glory to Russia
  • 17,289
  • 56
  • 182
  • 325

2 Answers2

2

I think you must use an Apache Server (or equivalent like lighttpd, NGINX, f5 etc.) for port forwarding on domain/subdomains. You can configure Apache as mentioned in:

Apache Tomcat 7 - Proxy Support HOW-TO

or you can inspired from:

Mapping a subdomain to a Servlet context using Apache 2.x and Tomcat 6.x

Community
  • 1
  • 1
veysiertekin
  • 1,731
  • 2
  • 15
  • 40
0

Make your Tomcat's monitoring port as 80. This is the default port called when no port is provided in the url.

And make your application as the default application

Setting default application in tomcat 7

Update :: You need to map your domain to the IP address of your machine which hosts the tomcat server.

Community
  • 1
  • 1
Chaitanya Gudala
  • 305
  • 1
  • 3
  • 22