httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernie Wing <bernie.w...@ihs.com>
Subject [users@httpd] Apache 2.0 ServerName's port not being used in releative redirects from servlets
Date Fri, 30 Jan 2004 22:31:12 GMT
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 <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message