You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Kikkeri, Amith" <am...@AIG.com> on 2015/11/12 22:04:15 UTC

Access application without giving port number and context root

Hi..
I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.

I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.

Appreciate you assistance.

Regards,
Amith



Deploying to root context with versioning

Posted by Andrew Hunt <An...@us.dunnhumby.com>.
Hey there,

I'm trying to deploy a war of my application to the root context. I name it ROOT.war and it autodeployed fine. When I try to add versioning like ROOT##1.war and ROOT##2.war, it seems to see the context as ##1 and fail to deploy. For example, I get exceptions saying it couldn't find /WEB-INF/sitemesh.xml. In the webapps folder it was deployed to ROOT##1, so anything referencing ROOT/WEB-INF seems to fail. Do you have any suggestions?

Thanks,
Drew
dunnhumby limited is a limited company registered in England and Wales with registered number 02388853 and VAT registered number 927 5871 83. Our registered office is at Aurora House, 71-75 Uxbridge Road, London W5 5SL. The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error you should delete it from your system immediately and advise the sender. dunnhumby may monitor and record all emails. The views expressed in this email are those of the sender and not those of dunnhumby.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access application without giving port number and context root

Posted by "Kikkeri, Amith" <am...@AIG.com>.
Thank you...... 
I will try IIS reverse proxy and update the status once I am successful.

Regards,
Amith Kikkeri

-----Original Message-----
From: Tauzell, Dave [mailto:Dave.Tauzell@surescripts.com] 
Sent: Monday, November 16, 2015 10:26 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Yes, you can use IIS as a reverse proxy.   I haven't done it, but looked into this in the past and found a few solutions.  You can google "IIS Reverse Proxy".   Some things to consider with a reverse proxy:

1. Your application cannot be sending back links with the hostname/port in it.
2. If your application does HTTP redirects, then you need to setup the reverse proxy to re-write those (not an issue, but something you need to configure).

-Dave

-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com] 
Sent: Monday, November 16, 2015 9:22 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Thanks. Ngnix is not an approved software in my company. Hence trying to see if there is a work around. Can IIS be used as a reverse proxy? I see IIS as an approved one.

Regards,
Amith Kikkeri


-----Original Message-----
From: Tauzell, Dave [mailto:Dave.Tauzell@surescripts.com] 
Sent: Monday, November 16, 2015 10:17 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

If you want to have multiple applications running on the same tomcat but each has a URL that hides this you need to use a reverse proxy server.



End User   ----> Reverse Proxy (NGINX for example )   ------------------------------------->   App 1
                              http://foo.bar/                                                ------------------------------------->  http://app.server:7832/foo
                              http://baz/bar/                                               ------------------------------------->  http://app.server:7832/bar


This is more complicated to setup but has the benefit of being able to move the tomcat instance around (a different port or server, for example) without the End User needed to change the URL they use.

If you don't want to run and manage a new process there are some java based reverse proxies that I think you could run on the Tomcat server itself:  http://wiki.apache.org/tomcat/ServletProxy.   You won't be able to hide the port with these however.

-Dave


-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com]
Sent: Monday, November 16, 2015 9:11 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Hi,
I don’t want to install my application as ROOT.war application. This will make it difficult if I want to deploy multiple applications in same tomcat instance.
Please suggest.

Regards,
Amith Kikkeri

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Thursday, November 12, 2015 4:17 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access application without giving port number and context root

Posted by "Tauzell, Dave" <Da...@surescripts.com>.
That's pretty neat.  Good to know about.

-Dave

Dave Tauzell | Senior Software Engineer | Surescripts
O: 651.855.3042 | www.surescripts.com |   Dave.Tauzell@surescripts.com
Connect with us: Twitter I LinkedIn I Facebook I YouTube


-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Monday, November 16, 2015 3:15 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

Dave,

On 11/16/15 10:26 AM, Tauzell, Dave wrote:
> Yes, you can use IIS as a reverse proxy.   I haven't done it, but
> looked into this in the past and found a few solutions.  You can
> google "IIS Reverse Proxy".   Some things to consider with a reverse
> proxy:
>
> 1. Your application cannot be sending back links with the
> hostname/port in it.
>
> 2. If your application does HTTP redirects, then you need to setup the
> reverse proxy to re-write those (not an issue, but something you need
> to configure).

You don't have to worry about either of these issues if your application uses the servlet API correctly and Tomcat has been configured with the RemoteIPValve, which understands reverse proxies.

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.

Re: Access application without giving port number and context root

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Dave,

On 11/16/15 10:26 AM, Tauzell, Dave wrote:
> Yes, you can use IIS as a reverse proxy.   I haven't done it, but
> looked into this in the past and found a few solutions.  You can
> google "IIS Reverse Proxy".   Some things to consider with a reverse
> proxy:
> 
> 1. Your application cannot be sending back links with the
> hostname/port in it.
>
> 2. If your application does HTTP redirects, then you need to setup
> the reverse proxy to re-write those (not an issue, but something you
> need to configure).

You don't have to worry about either of these issues if your application
uses the servlet API correctly and Tomcat has been configured with the
RemoteIPValve, which understands reverse proxies.

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access application without giving port number and context root

Posted by "Tauzell, Dave" <Da...@surescripts.com>.
Yes, you can use IIS as a reverse proxy.   I haven't done it, but looked into this in the past and found a few solutions.  You can google "IIS Reverse Proxy".   Some things to consider with a reverse proxy:

1. Your application cannot be sending back links with the hostname/port in it.
2. If your application does HTTP redirects, then you need to setup the reverse proxy to re-write those (not an issue, but something you need to configure).

-Dave

-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com] 
Sent: Monday, November 16, 2015 9:22 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Thanks. Ngnix is not an approved software in my company. Hence trying to see if there is a work around. Can IIS be used as a reverse proxy? I see IIS as an approved one.

Regards,
Amith Kikkeri


-----Original Message-----
From: Tauzell, Dave [mailto:Dave.Tauzell@surescripts.com] 
Sent: Monday, November 16, 2015 10:17 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

If you want to have multiple applications running on the same tomcat but each has a URL that hides this you need to use a reverse proxy server.



End User   ----> Reverse Proxy (NGINX for example )   ------------------------------------->   App 1
                              http://foo.bar/                                                ------------------------------------->  http://app.server:7832/foo
                              http://baz/bar/                                               ------------------------------------->  http://app.server:7832/bar


This is more complicated to setup but has the benefit of being able to move the tomcat instance around (a different port or server, for example) without the End User needed to change the URL they use.

If you don't want to run and manage a new process there are some java based reverse proxies that I think you could run on the Tomcat server itself:  http://wiki.apache.org/tomcat/ServletProxy.   You won't be able to hide the port with these however.

-Dave


-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com]
Sent: Monday, November 16, 2015 9:11 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Hi,
I don’t want to install my application as ROOT.war application. This will make it difficult if I want to deploy multiple applications in same tomcat instance.
Please suggest.

Regards,
Amith Kikkeri

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Thursday, November 12, 2015 4:17 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



RE: Access application without giving port number and context root

Posted by "Kikkeri, Amith" <am...@AIG.com>.
Thanks. Ngnix is not an approved software in my company. Hence trying to see if there is a work around. Can IIS be used as a reverse proxy? I see IIS as an approved one.

Regards,
Amith Kikkeri


-----Original Message-----
From: Tauzell, Dave [mailto:Dave.Tauzell@surescripts.com] 
Sent: Monday, November 16, 2015 10:17 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

If you want to have multiple applications running on the same tomcat but each has a URL that hides this you need to use a reverse proxy server.



End User   ----> Reverse Proxy (NGINX for example )   ------------------------------------->   App 1
                              http://foo.bar/                                                ------------------------------------->  http://app.server:7832/foo
                              http://baz/bar/                                               ------------------------------------->  http://app.server:7832/bar


This is more complicated to setup but has the benefit of being able to move the tomcat instance around (a different port or server, for example) without the End User needed to change the URL they use.

If you don't want to run and manage a new process there are some java based reverse proxies that I think you could run on the Tomcat server itself:  http://wiki.apache.org/tomcat/ServletProxy.   You won't be able to hide the port with these however.

-Dave


-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com]
Sent: Monday, November 16, 2015 9:11 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Hi,
I don’t want to install my application as ROOT.war application. This will make it difficult if I want to deploy multiple applications in same tomcat instance.
Please suggest.

Regards,
Amith Kikkeri

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Thursday, November 12, 2015 4:17 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access application without giving port number and context root

Posted by "Tauzell, Dave" <Da...@surescripts.com>.
If you want to have multiple applications running on the same tomcat but each has a URL that hides this you need to use a reverse proxy server.



End User   ----> Reverse Proxy (NGINX for example )   ------------------------------------->   App 1
                              http://foo.bar/                                                ------------------------------------->  http://app.server:7832/foo
                              http://baz/bar/                                               ------------------------------------->  http://app.server:7832/bar


This is more complicated to setup but has the benefit of being able to move the tomcat instance around (a different port or server, for example) without the End User needed to change the URL they use.

If you don't want to run and manage a new process there are some java based reverse proxies that I think you could run on the Tomcat server itself:  http://wiki.apache.org/tomcat/ServletProxy.   You won't be able to hide the port with these however.

-Dave


-----Original Message-----
From: Kikkeri, Amith [mailto:amith.kikkeri@AIG.com]
Sent: Monday, November 16, 2015 9:11 AM
To: Tomcat Users List
Subject: RE: Access application without giving port number and context root

Hi,
I don’t want to install my application as ROOT.war application. This will make it difficult if I want to deploy multiple applications in same tomcat instance.
Please suggest.

Regards,
Amith Kikkeri

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Thursday, November 12, 2015 4:17 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�]
�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�]
�\X�K�ܙ�B�
This e-mail and any files transmitted with it are confidential, may contain sensitive information, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender by reply e-mail immediately and destroy all copies of the e-mail and any attachments.

RE: Access application without giving port number and context root

Posted by "Kikkeri, Amith" <am...@AIG.com>.
Hi,
I don’t want to install my application as ROOT.war application. This will make it difficult if I want to deploy multiple applications in same tomcat instance.
Please suggest.

Regards,
Amith Kikkeri

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
Sent: Thursday, November 12, 2015 4:17 PM
To: Tomcat Users List
Subject: Re: Access application without giving port number and context root

2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Access application without giving port number and context root

Posted by Konstantin Kolinko <kn...@gmail.com>.
2015-11-13 0:04 GMT+03:00 Kikkeri, Amith <am...@aig.com>:
> Hi..
> I am trying to deploy a web application tomcat 7.0.61 . I have a DNS created and I want access the application without using port number and context root. Please suggest the best approach to achieve this.
>
> I can change the Port in server.xml to default port 80, but I would still need to give the context root, else it would be redirected to tomcat home page. In PRODUCTION, I would have a DNS created to access my application and want to avoid port number and context root, hence want to know the steps and best approach to achieve this. If there are some tutorials/Links, please share the same.


Both questions are already answered in the FAQ. See HowTo page there
and search for "ROOT" (uppercase)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org