You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by "Pearsall, Kyle" <Ky...@cis.canon.com> on 2000/08/25 19:10:48 UTC

starting up apache and tomcat automatically

I have installed Tomcat and Apache web server on a Linux machine and I have
been trying to configure apache and tomcat to start up automatically when
the computer boots up.  Now I know how to setup Apache to start
automatically and how to startup Tomcat automatically, but only by
themselves.  They have never worked together correctly when I try starting
them both automatically at the beginning.  I have read that Tomcat must
start before Apache, and it seems this is the main problem, I don't know how
to startup Tomcat before Apache.  Is it possible to do this?  Does the
software support this?  Is this a good idea to do this at this point in
Tomcat's development?  What should I do?  I appreciate any help.  Thank you,

Kyle P.

Re: Want to switch; stuck on virtual hosts

Posted by Andrew Stubbs <an...@stusoft.com>.
Yet again the instructions are buried deep in a document I cannot even
remember. All you need to do is add a line similar to the following in your
tomcat sever.xml and restart:


        <Host name="www.somehost.com" >
           <Context path="" docBase="/path/to/virtuals hosts/jsp etc" />
        </Host>

Restart and you are in business - this presumes that the you also setup
apache correclty to pass the *.jsp's to Tomcat and that virtual hosting
itself within apache is setup correctly

Docbase can be either an absolute path or relative to
/jakarta_home/webapps/ROOT/...

Hope this helps

Andrew


----- Original Message -----
From: "Doug Collinge" <dc...@abyssnet.com>
To: <ge...@jakarta.apache.org>
Sent: 25 August 2000 19:20
Subject: Want to switch; stuck on virtual hosts


> I have an apache service with several name-based virtual websites, all
> using JServ and GNUJSP.  Works fine but I want taglibs and other
> features of Tomcat so I'm trying to switch a couple of these websites to
> Tomcat 3.2.
>
> I had no trouble getting Tomcat to work out-of-the-box but I can't get
> it to serve the virtual hosts. The documentation says to serve virtual
> hosts by putting up a separate JVM and Tomcat instance for each virtual
> host.  This is obviously ridiculous and I won't be doing that.
>
> So my question is, why?  Why can't I aim all my virtual hosts at the
> same Tomcat and have Tomcat compile the various JSPs into servlets in
> different directories?  I understand that they'll all have the same
> classpath and security settings and so on but that's ok with me for now.
>
> Does anyone have any configs or advice?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>


mod_rewrite vs. mod_jk

Posted by Doug Collinge <dc...@abyssnet.com>.
Thanks for the help with the apache virtual host problem - got that 
working fine.  Next problem:

In the old JServ days I used a mod_rewrite rule to remap *.html into 
something else for a home-baked template system.  Doesn't seem to work 
with mod_jk.  I researched this issue in the archives and there seems to 
be a general consensus that it can be made to work with mod_jserv as 
long as mod_rewrite follows mod_jserv in the list of modules.  Ok, how 
about mod_jk?  Doesn't work for me no matter which side of mod_rewrite 
mod_jk falls on.

Should I expect mod_jk to work?  How fully-baked is mod_jk anyway?  
Should I retreat to mod_jserv?


Re: Want to switch; stuck on virtual hosts

Posted by Réseune <in...@reseune.fr>.
yes. my internet connection works fine but, i don't access to this url. i
have a failure to access, not to the page, but to the site. why?? what's
wrong?



    Cordialement.

Frédéric Mascaro
mascaro@reseune.fr
-----------------------------------------
    Découvrez nos dernières réalisations:
    http://www.quebecanmag.com -> NOUVEAU, le 1e portail sur le Québec
    http://www.creation-transmission.com -> NOUVEAU
    http://www.angouweb.com -> NOUVEAU, le portail de la ville d'Angoulême
-----------------------------------------
Réseune
http://www.reseune.fr
tel 05 49 46 64 54 & fax 05 49 46 64 55

> De : "Rob S." <rs...@home.com>
> Répondre à : general@jakarta.apache.org
> Date : Sat, 26 Aug 2000 01:30:33 -0700
> À : <ge...@jakarta.apache.org>
> Objet : RE: Want to switch; stuck on virtual hosts
> 
> Are you talking about this one?  It's there...
> 
> http://fuzz.cx/~rslifka/tomcat-apache-howto.html
> 
> - r
> 
>> -----Original Message-----
>> From: Réseune [mailto:info@reseune.fr]
>> Sent: August 26, 2000 1:26 AM
>> To: general@jakarta.apache.org
>> Subject: Re: Want to switch; stuck on virtual hosts
>> 
>> 
>> [26/08/00 - 10:25 (France)] the link is bad. which is the good one?
>> 
>> 
>> 
>> Cordialement.
>> 
>> Frédéric Mascaro
>> mascaro@reseune.fr
>> -----------------------------------------
>> Découvrez nos dernières réalisations:
>> http://www.quebecanmag.com -> NOUVEAU, le 1e portail sur le Québec
>> http://www.creation-transmission.com -> NOUVEAU
>> http://www.angouweb.com -> NOUVEAU, le portail de la ville d'Angoulême
>> -----------------------------------------
>> Réseune
>> http://www.reseune.fr
>> tel 05 49 46 64 54 & fax 05 49 46 64 55
>> 
>>> De : "Rob S." <rs...@home.com>
>>> Répondre à : general@jakarta.apache.org
>>> Date : Fri, 25 Aug 2000 12:45:57 -0700
>>> À : <ge...@jakarta.apache.org>
>>> Objet : RE: Want to switch; stuck on virtual hosts
>>> 
>>> http://fuzz.cx/~rslifka/tomcat-apache-howto.html
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: general-help@jakarta.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
> 
> 


RE: Want to switch; stuck on virtual hosts

Posted by "Rob S." <rs...@home.com>.
Are you talking about this one?  It's there...

http://fuzz.cx/~rslifka/tomcat-apache-howto.html

- r

> -----Original Message-----
> From: Réseune [mailto:info@reseune.fr]
> Sent: August 26, 2000 1:26 AM
> To: general@jakarta.apache.org
> Subject: Re: Want to switch; stuck on virtual hosts
>
>
> [26/08/00 - 10:25 (France)] the link is bad. which is the good one?
>
>
>
>     Cordialement.
>
> Frédéric Mascaro
> mascaro@reseune.fr
> -----------------------------------------
>     Découvrez nos dernières réalisations:
>     http://www.quebecanmag.com -> NOUVEAU, le 1e portail sur le Québec
>     http://www.creation-transmission.com -> NOUVEAU
>     http://www.angouweb.com -> NOUVEAU, le portail de la ville d'Angoulême
> -----------------------------------------
> Réseune
> http://www.reseune.fr
> tel 05 49 46 64 54 & fax 05 49 46 64 55
>
> > De : "Rob S." <rs...@home.com>
> > Répondre à : general@jakarta.apache.org
> > Date : Fri, 25 Aug 2000 12:45:57 -0700
> > À : <ge...@jakarta.apache.org>
> > Objet : RE: Want to switch; stuck on virtual hosts
> >
> > http://fuzz.cx/~rslifka/tomcat-apache-howto.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>


Re: Want to switch; stuck on virtual hosts

Posted by Réseune <in...@reseune.fr>.
[26/08/00 - 10:25 (France)] the link is bad. which is the good one?



    Cordialement.

Frédéric Mascaro
mascaro@reseune.fr
-----------------------------------------
    Découvrez nos dernières réalisations:
    http://www.quebecanmag.com -> NOUVEAU, le 1e portail sur le Québec
    http://www.creation-transmission.com -> NOUVEAU
    http://www.angouweb.com -> NOUVEAU, le portail de la ville d'Angoulême
-----------------------------------------
Réseune
http://www.reseune.fr
tel 05 49 46 64 54 & fax 05 49 46 64 55

> De : "Rob S." <rs...@home.com>
> Répondre à : general@jakarta.apache.org
> Date : Fri, 25 Aug 2000 12:45:57 -0700
> À : <ge...@jakarta.apache.org>
> Objet : RE: Want to switch; stuck on virtual hosts
> 
> http://fuzz.cx/~rslifka/tomcat-apache-howto.html


RE: Want to switch; stuck on virtual hosts

Posted by "Rob S." <rs...@home.com>.
http://fuzz.cx/~rslifka/tomcat-apache-howto.html

updated, esp re: VHosts.

- r

> -----Original Message-----
> From: Doug Collinge [mailto:dcolling@abyssnet.com]
> Sent: August 25, 2000 11:20 AM
> To: general@jakarta.apache.org
> Subject: Want to switch; stuck on virtual hosts
> 
> 
> I have an apache service with several name-based virtual websites, all 
> using JServ and GNUJSP.  Works fine but I want taglibs and other 
> features of Tomcat so I'm trying to switch a couple of these websites to 
> Tomcat 3.2.
> 
> I had no trouble getting Tomcat to work out-of-the-box but I can't get 
> it to serve the virtual hosts. The documentation says to serve virtual 
> hosts by putting up a separate JVM and Tomcat instance for each virtual 
> host.  This is obviously ridiculous and I won't be doing that.
> 
> So my question is, why?  Why can't I aim all my virtual hosts at the 
> same Tomcat and have Tomcat compile the various JSPs into servlets in 
> different directories?  I understand that they'll all have the same 
> classpath and security settings and so on but that's ok with me for now.
> 
> Does anyone have any configs or advice?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
> 

Want to switch; stuck on virtual hosts

Posted by Doug Collinge <dc...@abyssnet.com>.
I have an apache service with several name-based virtual websites, all 
using JServ and GNUJSP.  Works fine but I want taglibs and other 
features of Tomcat so I'm trying to switch a couple of these websites to 
Tomcat 3.2.

I had no trouble getting Tomcat to work out-of-the-box but I can't get 
it to serve the virtual hosts. The documentation says to serve virtual 
hosts by putting up a separate JVM and Tomcat instance for each virtual 
host.  This is obviously ridiculous and I won't be doing that.

So my question is, why?  Why can't I aim all my virtual hosts at the 
same Tomcat and have Tomcat compile the various JSPs into servlets in 
different directories?  I understand that they'll all have the same 
classpath and security settings and so on but that's ok with me for now.

Does anyone have any configs or advice?


RE: starting up apache and tomcat automatically

Posted by Patrick Dolbachian <do...@o2game.com>.
Hello,
I do that by modifiing the httpd script of Apache:
//////////////////////:
case "$1" in
  start)
        echo -n "Starting tomcat:"
        ##### Add for jdk 118 & jakarta by Patrick Dolbachian 09/08/2000
        PATH=$PATH:/usr/jdk118/bin
        JAVA_HOME=/usr/jdk118
        CLASSPATH=.:/usr/jdk118/lib/classes.zip
        TOMCAT_HOME=/usr/jakarta/jakarta-tomcat
        export PATH JAVA_HOME CLASSPATH TOMCAT_HOME
        /usr/jakarta/jakarta-tomcat/bin/startup.sh
        echo -n "Starting httpd: "
        daemon httpd
        echo
        touch /var/lock/subsys/httpd
        ;;
///////////////////////
but for stoping if I do the same thing my system block when shutting down

Good luck, (if you have a solution for shutting down properly you're welcome
========================
   Patrick Dolbachian
       O2GAME SA
 mailto:dolby@o2game.com
  http://www.o2game.fr
 Tel: +33 (0)3 4486 1858
 Fax: +33 (0)3 4486 0401
========================


-----Message d'origine-----
De : Pearsall, Kyle [mailto:Kyle.Pearsall@cis.canon.com]
Envoyé : vendredi 25 août 2000 19:11
À : Apache (E-mail)
Objet : starting up apache and tomcat automatically


I have installed Tomcat and Apache web server on a Linux machine and I have
been trying to configure apache and tomcat to start up automatically when
the computer boots up.  Now I know how to setup Apache to start
automatically and how to startup Tomcat automatically, but only by
themselves.  They have never worked together correctly when I try starting
them both automatically at the beginning.  I have read that Tomcat must
start before Apache, and it seems this is the main problem, I don't know how
to startup Tomcat before Apache.  Is it possible to do this?  Does the
software support this?  Is this a good idea to do this at this point in
Tomcat's development?  What should I do?  I appreciate any help.  Thank you,

Kyle P.

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