[EMAIL PROTECTED] wrote:
Hi,
I am a new subscriber and have a potential patch to mod_jk. It uses
the apache api to get the s->servername value. This has a benefit in
that is pays attention to the UseCanonicalName setting within apache.
So if a site has lots of ServerAlias entries only 1 entry in
server.xml is needed if UseCanonicalName is on for that VirtualHost.
The patch was against the jakarta-tomcat-connectors-4.1.12 source I
downloaded and I have tested it with Apache/1.3.26 and Tomcat 3.2.3 in
a virtual hosted situation with some vhosts enabled via
UseCanonicalName and some not.
Comments welcome, it seems to work fine.
--- mod_jk.c.orig Thu Oct 17 18:06:21 2002
+++ mod_jk.c Thu Oct 17 18:07:06 2002
@@ -466,7 +466,7 @@
s->remote_host = NULL_FOR_EMPTY(s->remote_host);
s->remote_addr = NULL_FOR_EMPTY(r->connection->remote_ip);
- s->server_name = (char *)(r->hostname ? r->hostname : r->server-
server_hostname);
+ s->server_name = ap_get_server_name(r);
s->server_port = htons( r->connection->local_addr.sin_port );
s->server_software = (char *)ap_get_server_version();
It's seems correct. JF, Mladen what do you think ?
--
To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>