Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 41967 invoked from network); 30 Jan 2004 22:33:02 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Jan 2004 22:33:02 -0000 Received: (qmail 25670 invoked by uid 500); 30 Jan 2004 22:32:27 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 25653 invoked by uid 500); 30 Jan 2004 22:32:27 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 25625 invoked from network); 30 Jan 2004 22:32:27 -0000 Received: from unknown (HELO mail1.ihs.com) (170.207.70.222) by daedalus.apache.org with SMTP; 30 Jan 2004 22:32:27 -0000 Received: from appdev45.ihs.com (appdev45.ihs.com [170.207.101.45]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i0UMVB4K008230; Fri, 30 Jan 2004 15:31:11 -0700 (MST) From: Bernie Wing Reply-To: bernie.wing@ihs.com Organization: IHS To: users@httpd.apache.org Date: Fri, 30 Jan 2004 15:31:12 -0700 User-Agent: KMail/1.5 Cc: bernie.wing@ihs.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401301531.12185.bernie.wing@ihs.com> X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: [users@httpd] Apache 2.0 ServerName's port not being used in releative redirects from servlets X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'm using Apache 2.0.47 along with mod_jk 1.2.5 and JBoss 3.2.2. The Apache server is setup to use port 8181 on a RedHat Linux host called appdev45.ihs.com. I have a proxy running that listens on port 8282 on the same host and it routes request to the 8181 port. This is kind of duplicating what our production system will eventually do with WSDs. All JBoss servlet requests from the browser to port 8282 are routed correctly to my JBoss servlet. Everything works find until the servlet does a response.sendRedirect() with a relative URL, Apache sends the absolute URL of: http://appdev45.ihs.com:8181/servlet instead of http://appdev45.ihs.com:8282/servlet I have also duplicated this on SunOS 5.8, so it isn't limited to Linux. I have set up the httpd.conf file with: Listen 8282 ServerName appdev45.ihs.com:8181 UseCanonicalName On If I change the hostname of the ServerName to a different host, Apache does use that new host in the redirect, but again the port is still the Listen port. I have also checked the header's referer value at the servlet and it contains the proxy's port number as expected. I have looked at the core.c of the Apache 2.0.47 and have verified that the rec->server->server_hostname and rec->server->port match my ServerName's settings. I also verified that the core's ap_get_server_port() method does return the ServerName's port. But, I have not been able to locate the method that handles the relative redirect to see for sure what is happening there. If someone has some ideas of what is happening or even knows the method and file that handles the relative redirect, it would be greatly appreciated. Or if I'm totally going down the wrong path, any comments will be welcomed. Thanks, -- email: bernie.wing@ihs.com --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org