top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Simple way to access application in multi instance envirnoment in tomcat?

+2 votes
290 views

I'm running a server with multiple instance of tomcat each instance has some apps deployed & accessed with host:port, like

myhost.com:7777/app1
myhost.com:8888/app2
myhost.com:9999/app3

Is there any way to hide the port from users & making app URL simpler with keeping multi instance? like this or any thing near

app1.myhost.com
app2.myhost.com
app3.myhost.com
posted Mar 9, 2014 by Ahmed Patel

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote

This can be solved by virtual hosting? Try the following link -
http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

answer Mar 9, 2014 by Anderson
+1 vote

What environment do you use? e.g. Windows, Linux, etc. If Linux, what flavour of Linux? e.g. RHEL (CentOS, Fedora), Ubuntu, etc.

What webserver would you like to use? e.g. Apache HTTPD, IIS, nginx, etc. They all have different ways to configure your setup.

Hope that helps.

answer Mar 9, 2014 by Anderson
Similar Questions
0 votes

In my web app, I'd like to re-use the (server-wide) Tomcat Realm that is already being used for HTTP Basic authentication but couldn't find a way how to get hold of the actual Realm instance.

I spent quite some time looking for a solution (complicated by the fact that most Google hits actually referred to the LDAP authentication realm) but found none. Is there a "config-file-only" solution or do I need to dig into the Tomcat source code and come up with my own JNDI ObjectFactory to achieve this ?

0 votes

Upgrading from tomcat 6.0.35 to 6.0.36 causes a simple jsp page to require about 20 minutes to load.

We have two clients that are running in an IBM mainframe USS (Unix System Services) environment and when they upgraded from tomcat 6.0.35 to 6.0.36, the simple jsp page in our webapp takes up to 20 minutes to load into the web browser. We have other clients that are successfully running 6.0.36 in
the USS environment. So it is a somewhat isolated issue.

I looked over the 6.0.36 change log at
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html#Tomcat%206.0.36%20%28jfclere%29,
but nothing jumped out at me as to which change may have caused the issue.

Since I am not a tomcat expert, I am asking for help on how to diagnose this issue.

Are there certain logging options that could be enabled?

0 votes

How to use multiple virtual hosts with a single SSL instance running on the standard https port.

+2 votes

I am getting ready to deploy the Second Instance of Tomcat on the same server using different IP addresses.

TomcatInstance1 (IP Address: xx.xx.xx.x1)
TomcatInstance2 (IP Address: xx.xx.xx.x2)

I have a few question, see below:

1) For the Tomcat server ports, I will be using the Connector Port and Redirect port to bind it to a specific IP address by using "address="xx.xx.xx.xx"". Is there a way to use the same Shutdown Port and AJP Port to bind it to a different IP address? Or do I have to change the Shutdown and AJP port number.

2) Keystore:
a. I am going to be using https, can I use the same .keystore to import the certificate?
b. If I move the .keystore to another location outside of Tomcat home, will Tomcat be able to see the .keystore if I specify the path within the server.xml file for .keystore path?
c. Should I create a new .keystore for the new instance?
d. What is the best practice for this?

3) Does anyone know a way to encrypt the clear-text passwords specified in tom-user.xml for the Tomcat manager and server.xml file for .keystore?

+1 vote

I want to access the JNDI Directory context in Tomcat8. I've used DirContextURLStreamHandler class which was in Tomcat 7. But now that has been removed.

Can someone tell me how can I access the JNDI Directory Context in Tomcat 8?

...