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 408CC200C09 for ; Wed, 11 Jan 2017 01:53:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3D8D3160B4B; Wed, 11 Jan 2017 00:53:57 +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 F3509160B3D for ; Wed, 11 Jan 2017 01:53:55 +0100 (CET) Received: (qmail 99540 invoked by uid 500); 11 Jan 2017 00:53:54 -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 99529 invoked by uid 99); 11 Jan 2017 00:53:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2017 00:53:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C848AC1B3E for ; Wed, 11 Jan 2017 00:53:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.1 X-Spam-Level: X-Spam-Status: No, score=-1.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-2.999, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=comcast.net Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id AE68xJWIjjY4 for ; Wed, 11 Jan 2017 00:53:49 +0000 (UTC) Received: from resqmta-po-04v.sys.comcast.net (resqmta-po-04v.sys.comcast.net [96.114.154.163]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 81C7A5F3A1 for ; Wed, 11 Jan 2017 00:53:49 +0000 (UTC) Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-04v.sys.comcast.net with SMTP id R763cqfEZrdcjR76LcrdJx; Wed, 11 Jan 2017 00:49:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1484095757; bh=goBeS7JSTKTH5s5Y2JEIbBDXNK/Q2/LrULONYoC+Yug=; h=Received:Received:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type; b=LNInR3XiqccwYKxh9HKkmUcc4OFXIePUACRa20sJZCD7KoSFuRXObPzA2hkXHiEPN Blh+3/ooj9QGJRauFISFQDHOA/FRwJLbwgUfP/b1bUp/LAKgLSodQA7zqrXRK1u6Vz pfBnGXTS+JedMFgtiaymJttSn7jQW6E7qBbATgG8DrogPlUwaByJAr7QwxFsblnncc RupyWDcf5zBp/n9TtdDtktA62CTof+rimi59UjkDgzS4W9m8VS8lpa7e8pEpH81Ux4 3wSVhRm1vmv1pMm+H5hKJWGsY2nKSPauv15pRpp263ik5ijKRsoJ7/vQO6TKeKwzIp icXOt51qNRTIw== Received: from resmail-po-271v.sys.comcast.net ([162.150.177.26]) by resomta-po-09v.sys.comcast.net with SMTP id R76Lc2Ss0cScxR76Lc9FVe; Wed, 11 Jan 2017 00:49:17 +0000 Date: Wed, 11 Jan 2017 00:49:17 +0000 (UTC) From: modjklist@comcast.net To: Tomcat Users List Message-ID: <360171122.88503202.1484095757282.JavaMail.zimbra@comcast.net> In-Reply-To: <81ccd9d8-8388-3c75-ef76-1edcb92a1c9d@christopherschultz.net> References: <740724059.87059185.1483941452508.JavaMail.zimbra@comcast.net> <81ccd9d8-8388-3c75-ef76-1edcb92a1c9d@christopherschultz.net> Subject: Re: 404 errors accessing webapp URLs using local IP address on fresh Tomcat 8.5.9 install MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_88503201_1962872848.1484095757281" X-Originating-IP: [2601:647:4481:1a40:5156:b1a4:fa3a:afad] X-Mailer: Zimbra 8.0.7_GA_6031 (ZimbraWebClient - SAF9.1 (Mac)/8.0.7_GA_6031) Thread-Topic: 404 errors accessing webapp URLs using local IP address on fresh Tomcat 8.5.9 install Thread-Index: 8wrMMkslQFqtLaNEflFRVKfEx7tvpA== X-CMAE-Envelope: MS4wfP0O6RdYBJKwZptWgewQyrJ7t65K6VxkseEpT6GxpVloQkBKjq3t/57LXbszEHFr3vkzGoCIrEK8a15/fkEKzm7UAA9qU8Yk3PaYDEaavnvkM2uq7z26 R0JfW8jNWM7NVBJh0DJZ8SLN55ORUQ9gKEGk/YZZ4hgLxG7aP0tptBRHyzKFlX+FlyfexTsqJc8Du7dQiVtKEUw1IZ8YmWZsFWU= archived-at: Wed, 11 Jan 2017 00:53:57 -0000 ------=_Part_88503201_1962872848.1484095757281 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Thanks for the help Christopher, I resolved this by adding 192.168.0.2 to hostB's httpd.conf file as a VirtualHost, then including JkMount for mod_jk. ----- Original Message ----- From: "Christopher Schultz" To: "Tomcat Users List" Sent: Tuesday, January 10, 2017 11:50:27 AM Subject: Re: 404 errors accessing webapp URLs using local IP address on fresh Tomcat 8.5.9 install -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 To whom it may concern, On 1/9/17 12:57 AM, modjklist@comcast.net wrote: > I have two Linux servers connected via a cross-connect cable with > internal IP addresses 192.168.0.1 (hostA) and 192.168.0.2 (hostB). > > > hostA runs CentOS 5, and hostB CentOS 7. > > hostB runs Apache 2.4.x, and Tomcat 8.5.9. All web traffic gets > routed to port 443 (e.g. HTTPS) of Apache web server hostB. All web > application traffic (e.g. > https://www.example.com/mywebapp/somepage) is then passed to Tomcat > via mod_jk version 1.2.42 on port 8009. Additionally, hostB Apache > web server is configured to listen on 192.168.0.2 port 8009 (hostA > Apache web server is not configured as such). > > If hostA attempts to access a webpage on hostB (via hostB external > IP address) from a browser or command line, such as: [root@hostA > ~]# curl -I http://www.example.com/mywebapp/somepage > > it returns status 200 (good). > > Now, if I modify the hostA /etc/hosts file hostA accesses to my > website (www.example.com) on hostB through the cross-connect cable > (e.g. 192.168.0.2 rather than the external IP address), the webpage > returns error 404. > > What can I change to get status 200? > > My web addresses are xxx.xxx.xxx.xxx (e.g. IPv4). I know Tomcat > configures IPv6 by default. So, I modified the setenv.sh as > follows: > > CATALINA_OPTS="-Xms512M -Xmx1024M -Djava.awt.headless=true > -Djava.net.preferIPv4Stack=true > -Djava.net.preferIPv4Addresses=true" > > This didn't change the result. > > As another clue, I observe that hostA always reports status 200 > (good) when accessing any hostB webpage in www.example.com that is > NOT part of /mywebapp, for both internal and external IP addresses. > > > Any ideas what I can try to resolve this? I'm new to Tomcat and > this is fresh install (previously used GlassFish) on a brand new > server. Thanks in advance for any advice. What does hostA say when you issue "host [hostB]" from the command-line? - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYdTsDAAoJEBzwKT+lPKRYQY8QAL2d3o6cqoNJ4ENxOA9al6i+ VETnlJ5JjDsAC0hzbd0c8eRZj8NryptV9hbx7nmVeIRNs+Pgr56BxIsmih+QGT+p vDCdeJEfcYXPdStpPOmBu1u+FfCJDIUEFevxigqYsvav/1UUXdoV3aW8ThyQaddd 30ecS9NmTaijYZjHA/ufTOymuFgSnwAwkO7PbwV1hWG/JNqnXNLM+Dywkv/5CqH/ DpbquCyiDrvDZVCBsvOUIRGfXyH3czxOHycGfl8GarNoskuvrc9gxHkSwc3HvIau qlfd7g9SICwrLeVcm02SbTkkUJV/xIV6p5csPMKt5bID3+MciX+XjOoFlo6GWVGY 6UtZ0OFvznvgb2wgOMEmf9N1ORqj1a8765VDae2oTJhpNoygW55/WwJT/s24gohz xEGTw5Fqddo8s8IzTWbIOChWSwQ1V/1gtjJJgn/O/JUyAobFvMipWAGLztfo/w4V +shtlh/+rRAigFrgc7cYAfp4+SMbnDCD4MBJHBdrgjAQuH1bg4+CbdN6WkhNsi0+ rcPFUJUQPxmdN1HtYAUmeXXEfMPuMJNhP3Dsq6L7RpEmKAFdkwrPe2AXkP/TzbeH yy/4M1Ng1EBMZuWHnEylo3o0A4qtp139o3B/gJiwZ5CVnQXxCwv0MsjiY9Z6wPPm FuzFy8TTIECLskz4vn5C =LNg6 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org ------=_Part_88503201_1962872848.1484095757281--