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 32942200BED for ; Sun, 1 Jan 2017 08:18:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2D914160B38; Sun, 1 Jan 2017 07:18:11 +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 7386C160B20 for ; Sun, 1 Jan 2017 08:18:10 +0100 (CET) Received: (qmail 51383 invoked by uid 500); 1 Jan 2017 07:18:09 -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 51371 invoked by uid 99); 1 Jan 2017 07:18:09 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Jan 2017 07:18:09 +0000 Received: from Christophers-MacBook-Pro.local (c-98-213-217-75.hsd1.il.comcast.net [98.213.217.75]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9B4C51A038B for ; Sun, 1 Jan 2017 07:18:08 +0000 (UTC) Subject: Re: Problem with Apache In front of Tomcat - No access to resource To: Tomcat Users List References: From: Christopher Schultz Message-ID: <1d202b82-76bf-b170-3dc5-b4f814edf0b6@christopherschultz.net> Date: Sun, 1 Jan 2017 02:18:11 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit archived-at: Sun, 01 Jan 2017 07:18:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Edwin, On 12/30/16 1:58 PM, Edwin Quijada wrote: > > > Chris, ________________________________ From: Christopher Schultz > Sent: Friday, December 30, 2016 > 12:36 AM To: Tomcat Users List Subject: Re: Problem with Apache In > front of Tomcat - No access to resource > > -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 > > Edwin, > > On 12/28/16 5:09 PM, Edwin Quijada wrote: >> Hi! >> >> I have a problem with apache + Tomcat. I am trying to put apache >> in front of Tomcat to access my app but I am getting an error >> 404. >> >> I have 2 virtual servers in apache for 2 DNS with 2 tomcats >> >> This is one of my virtual server >> >> ServerName server1.org ServerAlias >> *.server1.org ServerAdmin webmaster@localhost DocumentRoot >> /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog >> ${APACHE_LOG_DIR}/access.log combined #ProxyPreserveHost On >> >> ProxyRequests off ProxyPreserveHost On # Servers to proxy the >> connection, or # List of application servers Usage ProxyPass / >> http://localhost:8082/jq ProxyPassReverse / >> http://localhost:8082/jq >> >> The problem is when I access the site http://server1.org should >> be go to http://localhost:8082/jq but instead it goes to >> http://localhost:8082/jq/jq and obvious I get an error 404. >> >> My problem is I dont know why it duplicates the jq suffix if I >> go to http://ipserver1:8082/jq there is no problem. >> >> I check the error.log from apache and there is nothing to see. >> >> Any help or any clues will be appreciated. >> >> >> >> This is the output when I do http://server1.org Estado HTTP 404 >> - /jqjq/ >> >> type Informe de estado >> >> mensaje /jqjq/ >> >> descripción El recurso requerido no está disponible. > > If you map / -> /jq, then any request for / will be mapped to > /jq/jq, just as you requested. > > In my opinion, mapping / to /jq is going to cause you an awful lot > of headaches. It is better to map / -> / or /jq -> /jq. > > Try this: > > ProxyPass /jq http://localhost:8082/jq ProxyPassReverse /jq > http://localhost:8082/jq > > Then make a request to http://server1.org/jq/ and see if you get > better results. > > - -chris > > You alright.! that is the behaviour that I get, the question is why > ? I thought if I map / -> /jq it would go to /jq not /jq/jq , can > you explain me why this occurs ? > > Yoy alrigth in everuthing you told me but I have that doubt , why / > -> /jq go to /jq/jq ?? > > And yes, your solution worked I'm sorry, I mistyped. If / -> /jq I'd expect that a request for /index.html would go to /jq/index.html but that a request for / would go to /jq If you were to request /jq then you'd get /jq/jq of course. What if you watch the HTTP conversation with the server using fiddler, firebug, your browsers built-in dev tools, etc.? Are you seeing any redirects issued by the server? - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYaK0zAAoJEBzwKT+lPKRYS7sP/iULcWX4R4neFo/glkT3lWfM mifxOlTSZ1Tbjor/goZ5SU27be5nJU74zdLze+QolumxHdOu3DdidiMjLV0celd8 Ps1sVBjDQW4dhT0cvQ3SFuUkReEk0uSRaRU+6JJV3kOV8pJB6CdRQ5RpLvwi0jxD FJUQOxic5MWOwcrV7i/jT55QUVmSnis+H3Z+Dcay5+PCIiw98eblWQ7qpyXL/ZXU ikfm/yVfF3hTv4TcRro2dtidAwElpC3sLcVRfIsm+Yl3ksUdlbOMi7Bbs4EeWeS5 odGzgFW2ZwdgAA80lvcGBCP5k0c2DSK3haapEUeUaKnCUfitIlZ941yxsZ3rPTUt /vgNmi+j396VSadfd4Z0jRrJfEBDMUE8zeKtRr7gofZAeZmYwTMT0fiNBJPZmLu7 8z7TKKEpFNP8ny7hV+6dbSRXM+4PjlgvhpnEX1A+BuXIw9H+SLZrM1WJ1ZwgIccZ IyJ42pD5Voo1Tbtx/0sGtxZW5SFzfePNzP9f9/YUNOfJDcH6oAj6a9cJrJMdhqiq iMHW0rFwdF6IHQ2mRmS7GOWB32V4v9rwGkegVVRd0PDLZNSpYjaKl9fgnLeQkwbt Yh90q0NlU5N82pBd6JgYNNjBubOtMe8rTTV2tpNr22KelXndWZBduOIHfWW0im5n h1fmeKdLCMcxX+l8goV6 =Q/jt -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org