You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Hunter, Sandra" <Sa...@BCTransit.Com> on 2003/05/08 16:33:28 UTC

RE: Tomcat and Apache

Hi, Sorry to revisit this so much later but I am actually at the point where
I am making these changes (will this project ever end?).
Which file do I make these changes in? Tomcat's server.xml?
That's what I am guessing but...

-----Original Message-----
From: John Turner [mailto:tomcat-user@johnturner.com] 
Sent: Wednesday, April 23, 2003 11:51 AM
To: Tomcat Users List
Subject: Re: Tomcat and Apache


Cool.  The HOWTO is for localhost (http://localhost/index.jsp).  If you 
want to use something else in the URL, like "www.host.com" or whatever, 
then you need to substitute that everywhere it says "localhost", EXCEPT 
where it says

<Engine defaultHost="localhost"...

You want that to stay the same.  So, where it says

<Host name="localhost" appBase="..." ... >

you want it to say

<Host name="www.host.com" appBase="..." ... >

I would recommend duplicating the localhost setup, not replacing it, for 
failsafe's sake.

If you don't feel comfortable doing major edits to server.xml, you can 
alias "www.host.com" to "localhost" pretty quickly by adding the <Alias> 
tag:

<Host name="localhost" appBase="..." ...>
    <Alias>www.host.com</Alias>
    ....
</Host>

If you get server.xml setup correctly, you should be able to just HUP 
(restart) Tomcat to get a new mod_jk.conf file generated with your new 
hostnames, and then HUP Apache so it picks up the new mod_jk.conf file.

Another option, if you are comfortable with it, is to add the new Hosts (or 
Alias) with Tomcat's administration application instead of directly editing 
server.xml.

John

On Wed, 23 Apr 2003 11:38:52 -0700, Hunter, Sandra 
<Sa...@BCTransit.Com> wrote:

> Hi John,
> On the dev machine I have Apache 2.0 and Tomcat 4.0, Win2K OS, and the
> mod_jk connector. What else do you need to know?
> I followed your instructions, John, on your how-to site, as best I could.
> It seems like the connector is working on the dev machine because there I
> can load the app using the http://localhost/index.jsp URL, it is only 
> when I
> try to go externally (so to speak) that I have to revert to the port 
> 8080.
> Hmmmm.
> Sandra
>
> -----Original Message-----
> From: John Turner [mailto:tomcat-user@johnturner.com] Sent: Wednesday, 
> April 23, 2003 9:53 AM
> To: Tomcat Users List
> Subject: Re: Tomcat and Apache
>
>
> If http://devmachine/index.jsp doesn't work, the connector between Apache 
> and Tomcat is not working properly.
>
> Can you give us more info about the config on devmachine?
>
> John
>
> On Wed, 23 Apr 2003 06:48:50 -0700, Sandra Patricia Hunter 
> <re...@shaw.ca> wrote:
>
>> I am not sure if I should be concerned or not.
>>
>> I have installed Apache and Tomcat on my dev machine and have set up a
>> production machine that will be the place where users actually make use 
>> of
>> my app. Both machines are on the same network and run Win2K.
>>
>> Everything works fine but I am not sure if it is working correctly as I
>> haven't done this before: when I access the app on the dev machine I use
>> this address: http://localhost/index.jsp . When I access it on the
>> production machine I have to use this address:
>> http://devmachine:8080/index.jsp
>>
>> Seems to me I shouldn't have to include that 8080 if the prod machine is
>> able to access Apache properly and that we are actually still just using
>> Tomcat.
>>
>> There will be minimal users of this application and it will always be 
>> used
>> via the inhouse network so I am not overly concerned but... Should I be?
>>
>> Sandra Patricia Hunter
>> Systems Development and Web Design
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat and Apache

Posted by John Turner <to...@johnturner.com>.
Yep, server.xml.  Then, if you are using the ApacheConfig classes to 
generate Apache configuration (mod_jk.conf), you just restart Tomcat to 
generate a new mod_jk.conf file, and then HUP Apache so it picks up the new 
virtual host definitions.

John

On Thu, 8 May 2003 07:33:28 -0700, Hunter, Sandra 
<Sa...@BCTransit.Com> wrote:

> Hi, Sorry to revisit this so much later but I am actually at the point 
> where
> I am making these changes (will this project ever end?).
> Which file do I make these changes in? Tomcat's server.xml?
> That's what I am guessing but...
>
> -----Original Message-----
> From: John Turner [mailto:tomcat-user@johnturner.com] Sent: Wednesday, 
> April 23, 2003 11:51 AM
> To: Tomcat Users List
> Subject: Re: Tomcat and Apache
>
>
> Cool.  The HOWTO is for localhost (http://localhost/index.jsp).  If you 
> want to use something else in the URL, like "www.host.com" or whatever, 
> then you need to substitute that everywhere it says "localhost", EXCEPT 
> where it says
>
> <Engine defaultHost="localhost"...
>
> You want that to stay the same.  So, where it says
>
> <Host name="localhost" appBase="..." ... >
>
> you want it to say
>
> <Host name="www.host.com" appBase="..." ... >
>
> I would recommend duplicating the localhost setup, not replacing it, for 
> failsafe's sake.
>
> If you don't feel comfortable doing major edits to server.xml, you can 
> alias "www.host.com" to "localhost" pretty quickly by adding the <Alias> 
> tag:
>
> <Host name="localhost" appBase="..." ...>
> <Alias>www.host.com</Alias>
> ....
> </Host>
>
> If you get server.xml setup correctly, you should be able to just HUP 
> (restart) Tomcat to get a new mod_jk.conf file generated with your new 
> hostnames, and then HUP Apache so it picks up the new mod_jk.conf file.
>
> Another option, if you are comfortable with it, is to add the new Hosts 
> (or Alias) with Tomcat's administration application instead of directly 
> editing server.xml.
>
> John
>
> On Wed, 23 Apr 2003 11:38:52 -0700, Hunter, Sandra 
> <Sa...@BCTransit.Com> wrote:
>
>> Hi John,
>> On the dev machine I have Apache 2.0 and Tomcat 4.0, Win2K OS, and the
>> mod_jk connector. What else do you need to know?
>> I followed your instructions, John, on your how-to site, as best I 
>> could.
>> It seems like the connector is working on the dev machine because there 
>> I
>> can load the app using the http://localhost/index.jsp URL, it is only 
>> when I
>> try to go externally (so to speak) that I have to revert to the port 
>> 8080.
>> Hmmmm.
>> Sandra
>>
>> -----Original Message-----
>> From: John Turner [mailto:tomcat-user@johnturner.com] Sent: Wednesday, 
>> April 23, 2003 9:53 AM
>> To: Tomcat Users List
>> Subject: Re: Tomcat and Apache
>>
>>
>> If http://devmachine/index.jsp doesn't work, the connector between 
>> Apache and Tomcat is not working properly.
>>
>> Can you give us more info about the config on devmachine?
>>
>> John
>>
>> On Wed, 23 Apr 2003 06:48:50 -0700, Sandra Patricia Hunter 
>> <re...@shaw.ca> wrote:
>>
>>> I am not sure if I should be concerned or not.
>>>
>>> I have installed Apache and Tomcat on my dev machine and have set up a
>>> production machine that will be the place where users actually make use 
>>> of
>>> my app. Both machines are on the same network and run Win2K.
>>>
>>> Everything works fine but I am not sure if it is working correctly as I
>>> haven't done this before: when I access the app on the dev machine I 
>>> use
>>> this address: http://localhost/index.jsp . When I access it on the
>>> production machine I have to use this address:
>>> http://devmachine:8080/index.jsp
>>>
>>> Seems to me I shouldn't have to include that 8080 if the prod machine 
>>> is
>>> able to access Apache properly and that we are actually still just 
>>> using
>>> Tomcat.
>>>
>>> There will be minimal users of this application and it will always be 
>>> used
>>> via the inhouse network so I am not overly concerned but... Should I 
>>> be?
>>>
>>> Sandra Patricia Hunter
>>> Systems Development and Web Design
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org