Re: forward request by changing the port in request url
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Anil, On 6/13/13 2:00 PM, Anil Goyal -X (anigoyal - Aricent Technologies at Cisco) wrote: i have two service running under tomcat. One service is default i.e. catalina on port 8080 and 8443 second service is catalina_new on port 8081 and 8444. i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Tomcat does not come with any HTTP proxying capabilities out of the box. If you want to do that kind of thing, you'll have to use some kind of 3rd-party software. Apache httpd is god at this kind of thing: reverse-proxying is something it can do out-of-the-box. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRugxiAAoJEBzwKT+lPKRYwxAP/2KeJeq+bVwsml02oIuAiURf mD3ZAycGC4OJIbt7/qO2rSwbrWiPMueN/Heafk6jqAkEDs6bLgbT3CYikm5nMyPA /YXR4UlKsnAOPxD2lMZ3swxhoUeciv75RvQg+jSsySLf/29HkUg2vLeTXGVmjSOu c9odZT8FhCav+zKpWVNd/bOZ26MvSxl0jPP0ANGfZ/o/gy6NNgj5QB7kp4WhNQUW Xg4lCLegIx3ITcrtbLS+p5Jc0jSWD3buzkEcGTdZAPEZmkQyjSwxlv+JF6aSrBl4 yFLvubBylT+aqIlWXAYlWjSI5oqu+VOl94sEywi1T/kCHn+cWaKzZkmdXmzqcYmX bf3qvis+WS1gXq2pN5GgrN+ex+XG1b3RUBnFAc7iN3ecHjTQiMVBwKKuKvBxsecf Naa/0gbSyWbmnj0VPMZm6ug7M+hlO+AeA4ccJB39u+Cyg2WnyC2NRpS1uCds6BIj 4RlQ3kw6yuO2+ToTcGTzfq3v1RKXLm8Z6Q8xV8aXHgqYOwFtDi37EFr5ehniIiL+ eXpXo1e3TwrjrCRfG7qwgPZnU8jzUcZq42nl/qhar4l9cdbnl+6O0kQz9RWTJ0GK 8ozaXgVfjd0qB+uoPr2zw4ZzrZjENbTSLewVK+pYPcoMHhHi+ZIdGpYqDqmR2S3O ii7nWwMkrtuFCXXVdyWe =6wCS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: forward request by changing the port in request url
From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco) [mailto:anigo...@cisco.com] Subject: forward request by changing the port in request url i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. You should install at least a ROOT application for that service/host. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Once you have a ROOT webapp, you can deploy the standard URL rewrite filter therein to send the request anywhere you want: http://tuckey.org/urlrewrite/ - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: forward request by changing the port in request url
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chuck, On 6/13/13 2:23 PM, Caldarale, Charles R wrote: From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco) [mailto:anigo...@cisco.com] Subject: forward request by changing the port in request url i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. You should install at least a ROOT application for that service/host. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Once you have a ROOT webapp, you can deploy the standard URL rewrite filter therein to send the request anywhere you want: http://tuckey.org/urlrewrite/ I don't think that can be used for proxying, can it? I read the OP as saying there were two separate services, so it's not a simple forward or redirect. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRuhBrAAoJEBzwKT+lPKRYRPYP/ie8SwRTy08927ugk9kTb5hI jwFGwjUI4zPkIB03lu1sK1Q5s57hk6kjN/ggox0+GWe0g5uMfMFjia2dd0+ei+jk TJLQ5Lzm6bdoLJW7uHpuecGHYpgp52MEn6XzDQiszoiaQNtPfCWH/TNeCNA6WxvH nlGOSOD3SalLW4egxChvmgihVUPW6YDR8zqPrYSOgmViXCLAu8E8kVAH41lrHWdJ 1TV9cTi4ebxofYcY5yEixl5QRwO0dN04ibeSp2iAdZzLo5zESPlOWWQXaXq0XBrq OEjfTgfR09ZQ2KI6XZ/Ejr35bvL3XUqPzuY8lT8/c5NJMDINI8fY7b96ukCoPebS 7ilqO+H5FjLECdcYu/VshNWE0hZUGbQZR04NZcT63tAr0M8MOUuSZd9XsK6ldZ0V BRKnJjzZQ3/tT6ElwZGHo/dwdqb9pH2lwEe2s2VKIAn/zrhytUscIPqU0GL1zsGy xAWaIzMf42aZ3gvShD1sT60oev/udk6O6rpbyi5Mlt2LFrCT+1z5DU5ynHJ273DU AtJH+WO9bkZfhZqv+Sunus4fag5YtNAEOReYW5x/30t1Rm2qVsre6Aw8RmbBLgtk 9OQRgHRFKaci+X9vgNJYEcNx+FPqLKqwTxoXIksCMxwGnq61pZ0ei4uR9cFxV/Bh RyDiQiNf+LP7dYyzqHrE =bmsH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: forward request by changing the port in request url
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: forward request by changing the port in request url Once you have a ROOT webapp, you can deploy the standard URL rewrite filter therein to send the request anywhere you want: http://tuckey.org/urlrewrite/ I don't think that can be used for proxying, can it? No, not proxying, but I didn't read anything into the OP's requirements that it had to be. I read the OP as saying there were two separate services, so it's not a simple forward or redirect. Redirect works as long as the filter changes the port number to the desired one. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: forward request by changing the port in request url
for IP Redirecting and or automatic Network Address Translations (e.g. Port 80 redirects to Port 81) you will need a proxy server please contact supp...@cisco.com for product and service options Viel Gluck Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. From: anigo...@cisco.com To: users@tomcat.apache.org Subject: forward request by changing the port in request url Date: Thu, 13 Jun 2013 18:00:12 + i have two service running under tomcat. One service is default i.e. catalina on port 8080 and 8443 second service is catalina_new on port 8081 and 8444. i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Thanks Anil
RE: forward request by changing the port in request url
Hello, What is request for application? How would any software know this request is for abc app? You should use different URLs (servlet contexts) or different domain names. Then you may install nginx or apache or squid or something else that would forward your requests to the following tomcats. But you need to configure tomcat valve to store remote_addr. I will give you an example for nginx and domain names. Say, your DNS zone is example.com. You create 2 subdomains abc.example.com and def.example.com both with same IP (A record). You install nginx on it listening port 80. You configure it to pass requests for abc.example.com to localhost:8080 and requests for def.example.com to 8081. You open browser and navigate to abc.example.com. Nginx accepts your request and makes request to localhost:8080 where tomcat with app abc sits. Tomcat answers to nginx and it forwards it to you. That is pretty common solution. Ilya Kazakevich, Developer JetBrains Inc http://www.jetbrains.com Develop with pleasure! -Original Message- From: Anil Goyal -X (anigoyal - Aricent Technologies at Cisco) [mailto:anigo...@cisco.com] Sent: Thursday, June 13, 2013 10:00 PM To: Tomcat Users List Subject: forward request by changing the port in request url i have two service running under tomcat. One service is default i.e. catalina on port 8080 and 8443 second service is catalina_new on port 8081 and 8444. i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Thanks Anil - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: forward request by changing the port in request url
Hello, I do not think destination NAT is good solution because it works on TCP layer and knows nothing about domain names and URLs (both are application level (http) knowledge). So you would need to use separate IP/port for that and in case you have it you can bind tomcat there directly) So application-layer forwarding proxy (nginx, squid, apache) is way to go. Hardware cisco solutions could handle it too but I they are too big for such a simple task (unless you have really many users) Ilya -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Friday, June 14, 2013 2:28 AM To: Tomcat Users List Subject: RE: forward request by changing the port in request url for IP Redirecting and or automatic Network Address Translations (e.g. Port 80 redirects to Port 81) you will need a proxy server please contact supp...@cisco.com for product and service options Viel Gluck Martin i have two service running under tomcat. One service is default i.e. catalina on port 8080 and 8443 second service is catalina_new on port 8081 and 8444. i have application abc.war deployed in webapps_new service which is running on port 8081. This application is not there in webapps. i want if any request coming on port 8080 for application abc, it is forwarded to port 8081.(same for ssl port 8443-8444) Is there any way to do the same. Thanks Anil - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org