Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 92F52200B35 for ; Tue, 21 Jun 2016 02:54:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9187A160A65; Tue, 21 Jun 2016 00:54:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B6896160A55 for ; Tue, 21 Jun 2016 02:54:32 +0200 (CEST) Received: (qmail 50205 invoked by uid 500); 21 Jun 2016 00:54:30 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 50194 invoked by uid 99); 21 Jun 2016 00:54:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 00:54:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6A2451804C2 for ; Tue, 21 Jun 2016 00:54:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.064 X-Spam-Level: X-Spam-Status: No, score=0.064 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, URI_TRY_3LD=0.064, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id JNsZjxsj_hcJ for ; Tue, 21 Jun 2016 00:54:27 +0000 (UTC) Received: from thor.wissensbank.com (thor.wissensbank.com [81.169.250.120]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 291255F1F7 for ; Tue, 21 Jun 2016 00:54:27 +0000 (UTC) Received: from thor.wissensbank.com (localhost [127.0.0.1]) by thor.wissensbank.com (Postfix) with ESMTP id AB6A715A604A4 for ; Tue, 21 Jun 2016 02:54:26 +0200 (CEST) Received: by thor.wissensbank.com (Postfix, from userid 500) id 98DAD15A60BEC; Tue, 21 Jun 2016 02:54:26 +0200 (CEST) Received: from [192.168.245.214] (p549E0757.dip0.t-ipconnect.de [84.158.7.87]) (Authenticated sender: andre.warnier@ice-sa.com) by thor.wissensbank.com (Postfix) with ESMTPA id 9FF9915A604A4 for ; Tue, 21 Jun 2016 02:54:25 +0200 (CEST) Subject: Re: Need help with URL redirecting To: users@tomcat.apache.org References: <57641F65.8050508@ice-sa.com> <576451DC.60603@ice-sa.com> <14d06e1a978048d0bdf80e9e31e3c4a4@EXCAMB03.rpega.com> From: =?UTF-8?Q?Andr=c3=a9_Warnier_=28tomcat=29?= Message-ID: <5768903A.2080404@ice-sa.com> Date: Tue, 21 Jun 2016 02:54:18 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP archived-at: Tue, 21 Jun 2016 00:54:33 -0000 On 20.06.2016 23:57, Christopher Schultz wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Sean, > > On 6/20/16 2:26 PM, Sean Son wrote: >> On Mon, Jun 20, 2016 at 12:53 PM, Mekkelsen Madden, Steve < >> Steve.MekkelsenMadden@pega.com> wrote: >> >>> One thing you could do is have an entry in your webapps\ROOT >>> folder called like: MyAppRedirect.html (name can be anything) >>> Inside the file you need something like: >> HTTP-EQUIV="Refresh" CONTENT="0; URL=../myApp/connection "> >>> >>> In your conf\web.xml at the bottom of it, you'll see 3 lines >>> shown below: >>> index.html >>> index.htm >>> index.jsp >>> >>> Change this to point to your MyAppRedirect.html page. >>> >>> MyAppRedirect.html >>> >>> >>> That's a simple way to redirect your application. Your DNS / >>> reverse proxy could take care of the port # and users only need >>> to call your application by name >>> (https://callMyApplication.domain.com) when the DNS/reverse proxy >>> redirects it to the server's port say 8088, the html file appends >>> the remaining portion of the url to what the users typed. >>> >>> >>> -----Original Message----- From: Sean Son >>> [mailto:linuxmailinglistsemail@gmail.com] Sent: Monday, June 20, >>> 2016 12:42 PM To: Tomcat Users List ; >>> aw@ice-sa.com Subject: Re: Need help with URL redirecting >>> >>> On Fri, Jun 17, 2016 at 3:39 PM, André Warnier (tomcat) >>> wrote: >>> >>>> Hi. Another tip : on his list,mit is preferred if you respond >>>> in or below the previous text. That's why I moved your previous >>>> answer. It makes it easier to follow the conversation without >>>> having to scroll back and forth all the time. >>>> >>>>> >>>> >>>>> >>>>> On Fri, Jun 17, 2016 at 12:03 PM, André Warnier (tomcat) >>>>> wrote: >>>>> >>>>> On 17.06.2016 17:03, Sean Son wrote: >>>>>> >>>>>> Hello all >>>>>>> >>>>>>> I am new to the list. This is what i am trying to do but >>>>>>> need help on: >>>>>>> >>>>>>> >>>>>>> I have a webapp running on tomcat 8: >>>>>>> https://myapp.example.com:8443/myapp >>>>>>> >>>>>>> I am going to set up a DNS record myapp.example.com which >>>>>>> will point to the IP address of the tomcat server that >>>>>>> hosts the webapp.. I want this new DNS record >>>>>>> myapp.example.com to redirect to >>>>>>> https://myapp.example.com:8443/myapp. In other words, I >>>>>>> want the URL to redirect port 80 to the URL for the >>>>>>> webapp automatically so the users will not have to enter >>>>>>> in the port number whenever they want to browse to the >>>>>>> webapp. I tried doing research on google and I was not >>>>>>> able to find a straight forward way of doing this. Any >>>>>>> help is greatly appreciated! >>>>>>> >>>>>>> >>>>>>> >>>>>>> The first thing you would have to check, is whether port >>>>>>> 80 is still >>>>>> free on that server, or if there is already another >>>>>> webserver (e.g. Apache httpd) using it. >>>>>> >>>>>> The second thing to clarify is whether, apart from "myapp", >>>>>> there are other web applications (not called "myapp") which >>>>>> you are running or would want to run under Tomcat on that >>>>>> server. If not, then you might want to run your application >>>>>> as the *default* application, so that users would get to it >>>>>> with the URL " https://myapp.example.com:8443/", instead of >>>>>> " https://myapp.example.com:8443/myapp". To do this first, >>>>>> have a look at : http://wiki.apache.org/tomcat/HowTo and >>>>>> look at #17 : How do I make my web application be the >>>>>> tomcat default application >>>>>> >>>>>> It will just be easier if you clear up the above points >>>>>> first, because there are multiple possibilities, and it >>>>>> narrows down the scope of the tips we can provide. >>>>>> >>>>>> >>>> On 17.06.2016 18:43, Sean Son wrote: >>>> >>>>> Hello Andre >>>>> >>>>> thank you for your response. >>>>> >>>>> There are no other webservers running on this machine. There >>>>> are other web apps as well, but the only way to access them >>>>> is through myapp. So should I deploy myapp as the default app >>>>> ? >>>>> >>>>> >>>> Yes, I think that it will make the rest easier. So do that, as >>>> per the instructions above, and then we will continue. >>>> >>>> >>>> >>>> >>>> >>>> -------------------------------------------------------------------- > - - >>>> >>>> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>> >>>> >>> Thank you for the tidbit about how to reply :) So I used number >>> 17 from the website and i deployed the war file as the ROOT.war >>> file. What should the next steps be? >>> >>> >>> I thank you again for all of your help! >>> >> >> >> Thank you Steve for the suggestion. Will this work with out using a >> reverse proxy? My management told me not to use a reverse proxy > > Yes, you can do this without a reverse proxy, but removing the port > number can be a bit of an issue, which is why a reverse proxy is > sometimes recommended: it's just easier that way -- especially if > another web server is already available for that purpose. > > For more help, you'll have to give us more information about your > environment: OS, other services already available on the network, etc. > For example, if an appropriate reverse proxy is already available, > then you can point your DNS record to that proxy, and use a virtual > host for that domain name. Then, proxy everything to your Tomcat instanc > e. > Actually, I was thinking of using Tomcat only, and configuring 2 : - one to listen on port 80, with a single and simple default app which sends back a "permanent redirect" to the other Host - one to listen on the HTTPS port, with the real application (or if not possible with 2 Hosts, then 2 separate Tomcat instances). But yes, it would be simpler with a reverse proxy in front. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org