You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mann, Bradley" <bm...@harris.com> on 2006/06/07 22:07:13 UTC

HTTPD with Tomcat

Hello,

I am attempting to setup a scenario in which Tomcat is hosting a web
application behind HTTPD using the Jakarta Connector. I have installed
the following on Solaris 10:

Apache HTTPD 2.0.58
Apache Tomcat 4.1.31
Apache Jakarta Tomcat Connector 1.2.15

I am able to access HTTPD's document root, and I am able to access my
web application through Tomcat. I am having trouble, however,
understanding how to get the two to interact using the connector. I
believe I have it setup properly, with mod_jk located in the /modules
directory of HTTPD, and with an Include statement at the end of
httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under
the Server section of server.xml in the /conf directory of Tomcat, I
have added a listener as follows:

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/apache/modules/mod_jk.so" />

which points to the location of mod_jk.so.

I have added the same line under the Host section, with the added
attributes:

append="true" forwardAll="false"

My main question is, how do I get my static content from HTTPD to link
to my web application under Tomcat. Do I simply add the Tomcat port
number (8080) to the links in my static content, or is there a more
eloquent way of doing things? I thought the point of the connector was
to prevent having to do this so the experience is seamless for the user.
Any help or ideas are greatly appreciated.

Thanks,

Brad Mann
Software Engineer - Information Access Services
HARRIS Corporation / GCSD
(321) 984-6292


Re: HTTPD with Tomcat

Posted by Bill Barker <wb...@wilshire.com>.
The auto-config Listener has always been somewhat problematic, especially 
with TC 4.x.  At the very least, you need to include in httpd.conf:
  Include /path/to/catalina/home/conf/auto/mod_jk.conf

I don't believe that the Listener really does all that much under the 
<Server> tag.  Even in TC 5.5.x, you need it under the <Engine> tag to get 
simple auto-config.  I believe (since I'm not interested enough to look :), 
that you also need it under the <Context> tag for TC 4.x.  It should be all 
written up in the FM.

"Mann, Bradley" <bm...@harris.com> wrote in message 
news:DC0D355D872604419266B641C9B5AD0C015F162B@mlbe2k5.cs.myharris.net...
Hello,

I am attempting to setup a scenario in which Tomcat is hosting a web
application behind HTTPD using the Jakarta Connector. I have installed
the following on Solaris 10:

Apache HTTPD 2.0.58
Apache Tomcat 4.1.31
Apache Jakarta Tomcat Connector 1.2.15

I am able to access HTTPD's document root, and I am able to access my
web application through Tomcat. I am having trouble, however,
understanding how to get the two to interact using the connector. I
believe I have it setup properly, with mod_jk located in the /modules
directory of HTTPD, and with an Include statement at the end of
httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under
the Server section of server.xml in the /conf directory of Tomcat, I
have added a listener as follows:

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/apache/modules/mod_jk.so" />

which points to the location of mod_jk.so.

I have added the same line under the Host section, with the added
attributes:

append="true" forwardAll="false"

My main question is, how do I get my static content from HTTPD to link
to my web application under Tomcat. Do I simply add the Tomcat port
number (8080) to the links in my static content, or is there a more
eloquent way of doing things? I thought the point of the connector was
to prevent having to do this so the experience is seamless for the user.
Any help or ideas are greatly appreciated.

Thanks,

Brad Mann
Software Engineer - Information Access Services
HARRIS Corporation / GCSD
(321) 984-6292





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HTTPD with Tomcat

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
you can also make your own life very easy, by switching to mod_proxy, 
and voila, everything works :)

Filip


Mann, Bradley wrote:
> Hello,
>
> I am attempting to setup a scenario in which Tomcat is hosting a web
> application behind HTTPD using the Jakarta Connector. I have installed
> the following on Solaris 10:
>
> Apache HTTPD 2.0.58
> Apache Tomcat 4.1.31
> Apache Jakarta Tomcat Connector 1.2.15
>
> I am able to access HTTPD's document root, and I am able to access my
> web application through Tomcat. I am having trouble, however,
> understanding how to get the two to interact using the connector. I
> believe I have it setup properly, with mod_jk located in the /modules
> directory of HTTPD, and with an Include statement at the end of
> httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under
> the Server section of server.xml in the /conf directory of Tomcat, I
> have added a listener as follows:
>
> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> modJk="/usr/apache/modules/mod_jk.so" />
>
> which points to the location of mod_jk.so.
>
> I have added the same line under the Host section, with the added
> attributes:
>
> append="true" forwardAll="false"
>
> My main question is, how do I get my static content from HTTPD to link
> to my web application under Tomcat. Do I simply add the Tomcat port
> number (8080) to the links in my static content, or is there a more
> eloquent way of doing things? I thought the point of the connector was
> to prevent having to do this so the experience is seamless for the user.
> Any help or ideas are greatly appreciated.
>
> Thanks,
>
> Brad Mann
> Software Engineer - Information Access Services
> HARRIS Corporation / GCSD
> (321) 984-6292
>
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006
>   


-- 


Filip Hanik

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org