You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Qing Xie <xi...@ecopiabio.com> on 2003/05/06 17:01:17 UTC

in mod_jk.conf file and 404 not found

Hi Everyone,

In mod_jk.conf file, most of the contents are nested inside 
<VirtualHost> tag, and this causes "404 not found" errors for all apps 
under webapps dir. If I remove <VirtualHost> tag in  mod_jk.conf 
manually and resart apache, everything works fine. In my case, I don't 
want any other hosts other than my default host. Is there a way to 
configure tomcat not to take my default host as a virtualhost?

Thanks,

Qing


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


Re: Why do I have to delete tag in mod_jk.conf

Posted by Qing Xie <xi...@ecopiabio.com>.
Hi John,

I tried to make the following changes:

1. #ServerName (not to define the global server name)
2. NameVirtualHost my.host.com (I had to specify the host name because 
if I use *, I got warning
    [Fri May 09 14:50:46 2003] [warn] NameVirtualHost *:0 has no 
VirtualHosts

It still doesn't work.

I also read from Apache HTTP Server doc saying that one of the virtual 
host name must be the same with the global server name. I attach it here:
***********
Main host goes away
If you are adding virtual hosts to an existing web server, you must also 
create a <VirtualHost> block for the existing host. The |ServerName| and 
|DocumentRoot| included in this virtual host should be the same as the 
global |ServerName| and |DocumentRoot|. List this virtual host first in 
the configuration file so that it will act as the default host.
***********

I'm realy confused.

Qing

John Turner wrote:

>
> I would try disabling Apache's global ServerName, and making sure you 
> have this in httpd.conf:
>
> NameVirtualHost *
>
> John
>
> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>
>> Hi John,
>>
>> Thanks so much for helping me again.
>>
>> I've tried to change my global Apache ServerName to something else, 
>> such as "localhost", "some.host.com"(which doesn't exist), or not 
>> define it at all, but still, I got the same result.
>>
>> Qing
>>
>> John Turner wrote:
>>
>>>
>>> You have to delete the VirtualHost container from mod_jk.conf 
>>> because you already have that hostname hardcoded in your httpd.conf.
>>>
>>> You want your global Apache ServerName to be something OTHER than 
>>> any of your VirtualHost ServerNames....it shouldn't be the same.
>>>
>>> John
>>>
>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I posted this question a few days ago but didn't get any answers. I 
>>>> hope somebody can help me this time because I really couldn't 
>>>> understand what I didn't wrong.
>>>>
>>>> Basically, I get 404-not found error when I tried to access 
>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I 
>>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, 
>>>> the above link works fine. Looks like I have problems with my 
>>>> virtual host config, so JKMount has to be globle in order to work. 
>>>> I'm using apache 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat 
>>>> Linux7.3.
>>>>
>>>> I'm attaching main parts of my configration files here. Any inputs 
>>>> are highly appreciated.  Thanks very much!
>>>>
>>>> Qing
>>>>
>>>> ####################### httpd.conf 
>>>> ######################################
>>>> ServerName my.host.com:80
>>>> UseCanonicalName Off
>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>>
>>>>
>>>> ####################### mod_jk.conf 
>>>> ######################################
>>>> <IfModule !mod_jk.c>
>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>>>> </IfModule>
>>>>
>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>>
>>>> JkLogLevel info
>>>>
>>>> <VirtualHost my.host.com>
>>>> ServerName my.host.com
>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>>>> <Directory "/usr/java/tomcat/webapps/examples">
>>>> Options Indexes FollowSymLinks
>>>> DirectoryIndex index.html index.htm index.jsp
>>>> </Directory>
>>>> <Location "/examples/WEB-INF/*">
>>>> AllowOverride None
>>>> deny from all
>>>> </Location>
>>>> <Location "/examples/META-INF/*">
>>>> AllowOverride None
>>>> deny from all
>>>> </Location>
>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>>> JkMount /examples/snoop  ajp13
>>>> JkMount /examples/*  ajp13
>>>> JkMount /examples/servlet/*  ajp13
>>>> JkMount /examples/CompressionTest  ajp13
>>>> JkMount /examples/*.jsp  ajp13
>>>> JkMount /examples/servletToJsp  ajp13
>>>> JkMount /examples/SendMailServlet  ajp13
>>>> </VirtualHost>
>>>>
>>>> ####################### server.xml 
>>>> ######################################
>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>>>> unpackWARs="true" autoDeploy="true">
>>>> <Context path="/examples" docBase="examples" debug="0"
>>>> reloadable="true" crossContext="true">
>>>> <Context path="" docBase="ROOT" debug="0"/>
>>>> </Host>
>>>> </Engine>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>
>
>



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


Re: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
Yes.

John

On Tue, 13 May 2003 12:08:39 -0300, Gustavo Lima <li...@opendf.com.br> 
wrote:

> John,
>
> Just bothering you a little more. IS possible to setup a per domain
> management area where that domain just sees it own context?
>
> Thank?s
>
> Gustavo
> ----- Original Message ----- From: "John Turner" <tomcat- 
> user@johnturner.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, May 12, 2003 11:41 AM
> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
>>
>> I do use the Listener, and I do have something in server.xml for each
>> domain.  I take the generated mod_jk.conf file and tweak it slightly 
>> (like
>> adding the JkMount for *.do).  Keep in mind that I run several 
>> production
>> servers for a couple dozen domain names and clients...my HOWTOs don't
>> describe how to duplicate my setup, they describe how to get up and
> running
>> with a simple virtual host (localhost is a virtual host for all intents
> and
>> purposes, just not one you can access from an external node) framework
>> using default installs and configurations as much as possible.  Anything
>> else is left as an exercise for the reader.  After all, if my boss knew
>> anyone could duplicate what I do by reading some docs, I'd be out of a
> job.
>> ;)
>>
>> I don't use WAR files, but as far as I know, WAR files = Contexts (in
>> general), so if I had to guess, you would do it by accessing the manager
>> app on a given virtual host and deploy your WAR file there.
>>
>> John
>>
>> On Mon, 12 May 2003 11:28:12 -0300, Gustavo Lima <li...@opendf.com.br>
>> wrote:
>>
>> > John,
>> >
>> > Thank?s and a couple of questions. Do you put something else on your
>> > server.xml for each domain or just for your main domain? As far as I
>> > understand you are not using the listener that you suggest in the 
>> HOWTO.
>> > You
>> > edit the mod_jk.conf directly? Last question: How do I link specific 
>> war
>> > files to their own domains?
>> >
>> > Thank?s again.
>> >
>> > Gustavo
>> > ----- Original Message ----- From: "John Turner" <tomcat-
>> > user@johnturner.com>
>> > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> > Sent: Monday, May 12, 2003 11:05 AM
>> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>> >
>> >
>> >>
>> >> I'm running Tomcat 4.1 and Apache 2 (Solaris).
>> >>
>> >> My httpd.conf has no global ServerName defined.  It has a wildcard 
>> for
>> >> NameVirtualHost:
>> >>
>> >> NameVirtualHost *
>> >>
>> >> My mod_jk.conf files look like this:
>> >>
>> >> <VirtualHost *>
>> >> ServerName host.domain.com
>> >> DocumentRoot /usr/local/tomcat/webapps/host
>> >> # Static files
>> >> Alias /myApp "/usr/local/tomcat/webapps/myApp"
>> >> <Directory "/usr/local/tomcat/webapps/myApp">
>> >> Options Indexes FollowSymLinks
>> >> DirectoryIndex index.jsp
>> >> </Directory>
>> >> <Location "/myApp/WEB-INF/*">
>> >> AllowOverride None
>> >> deny from all
>> >> </Location>
>> >> <Location "/myApp/META-INF/*">
>> >> AllowOverride None
>> >> deny from all
>> >> </Location>
>> >> JkMount /myApp/*.do  ajp13
>> >> JkMount /myApp/*.jsp  ajp13
>> >> </VirtualHost>
>> >>
>> >> I tweak the JkMount (adding *.do for Struts, for example), so I don't
>> >> use
>> >> the output of the ApacheConfig classes directly, but I do use
>> >> mod_jk.conf
>> >> as much as I can, with as little modification as I can.  Right now,
>> >> there
>> >> are 11 VirtualHost containers in my mod_jk.conf, each one very 
>> similar
>> >> to
>> >> the one shown above, the only difference being the different values 
>> for
>> >> "host.domain.com" and the different webapp roots.
>> >>
>> >> I have some Tomcat 3 servers that do pretty much the same thing, but
>> >> with
>> >> mod_jserv...there are 22 virtual hosts there.
>> >>
>> >> John
>> >>
>> >> On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima 
>> <li...@opendf.com.br>
>> >> wrote:
>> >>
>> >> > Hi John,
>> >> >
>> >> > Maybe you have answered this question a thousand times but I?m not
>> >> able
>> >> > to
>> >> > find on list archives. How are you using these 10-12 virtual hosts
>> >> > exactly?
>> >> >
>> >> > Thank?s for your help.
>> >> >
>> >> > Gustavo
>> >> > ----- Original Message ----- From: "John Turner" <tomcat-
>> >> > user@johnturner.com>
>> >> > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> >> > Sent: Monday, May 12, 2003 9:22 AM
>> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in 
>> mod_jk.conf
>> >> >
>> >> >
>> >> >>
>> >> >> Well, I think there is something else going on, most likely with
> your
>> >> >> Apache configuration.
>> >> >>
>> >> >> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
>> >> > auto-generation,
>> >> >> and 10-12 virtual hosts, and it works like a champ.
>> >> >>
>> >> >> John
>> >> >>
>> >> >> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman
>> > <b....@attbi.com>
>> >> >> wrote:
>> >> >>
>> >> >> > I think the second problem (having to manually define all of 
>> your
>> >> >> > contexts)
>> >> >> > could be solved if the <DefaultContext> would accept a 
>> <Listener>
>> >> >> inside
>> >> >> > it - which is allowed according to the documentation, but I 
>> never
>> >> got
>> >> >> it
>> >> >> > working and ultimately decided that auto-deploying applications
> and
>> >> >> > having
>> >> >> > them linked through to Apache wasn't what I was after...  If
>> >> someone
>> >> > else
>> >> >> > has a suggestion to make a Listener work within a 
>> DefaultContext,
>> >> I'd
>> >> >> > love
>> >> >> > to hear the solution!
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Brian
>> >> >> >
>> >> >> > -----Original Message-----
>> >> >> > From: Qing Xie [mailto:xie@ecopiabio.com]
>> >> >> > Sent: Friday, May 09, 2003 2:28 PM
>> >> >> > To: Tomcat Users List
>> >> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in
>> >> mod_jk.conf
>> >> >> >
>> >> >> >
>> >> >> > Hi Brian,
>> >> >> >
>> >> >> > This did remove the <VirtualHost> tag in mod_jk.conf and solved
> the
>> >> >> > problem, but it caused another problem which is that I have to
>> >> define
>> >> >> a
>> >> >> > context for each application and place the listener there,
>> >> otherwise,
>> >> >> > the JKMounts are not generated.
>> >> >> >
>> >> >> > I'm glad I have this option because at least, I don't have to
>> >> modify
>> >> >> > mod_jk.conf every time I restart tomcat.
>> >> >> >
>> >> >> > Thank you very much :-)
>> >> >> >
>> >> >> > Qing
>> >> >> >
>> >> >> > Brian Briggman wrote:
>> >> >> >
>> >> >> >> Another option may be to remove your Listener in server.xml 
>> from
>> >> >> right
>> >> >> > under
>> >> >> >> the <Host> (this is why you're getting a virtual host in
>> > mod_jk.conf)
>> >> >> ,
>> >> >> >> and
>> >> >> >> instead place a Listener under each <Context> which will cause
> all
>> > of
>> >> >> >> the
>> >> >> >> same JKMounts to get generated in mod_jk.conf, just not nested
>> > within
>> >> >> a
>> >> >> >> virtual host.
>> >> >> >>
>> >> >> >> Brian
>> >> >> >>
>> >> >> >> -----Original Message-----
>> >> >> >> From: John Turner [mailto:tomcat-user@johnturner.com]
>> >> >> >> Sent: Friday, May 09, 2003 11:57 AM
>> >> >> >> To: Tomcat Users List
>> >> >> >> Subject: Re: Why do I have to delete <VirtualHost> tag in
>> > mod_jk.conf
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> I would try disabling Apache's global ServerName, and making 
>> sure
>> > you
>> >> >> >> have
>> >> >> >> this in httpd.conf:
>> >> >> >>
>> >> >> >> NameVirtualHost *
>> >> >> >>
>> >> >> >> John
>> >> >> >>
>> >> >> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie 
>> <xi...@ecopiabio.com>
>> >> >> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>> Hi John,
>> >> >> >>>
>> >> >> >>> Thanks so much for helping me again.
>> >> >> >>>
>> >> >> >>> I've tried to change my global Apache ServerName to something
>> >> else,
>> >> >> >>> such
>> >> >> >>> as "localhost", "some.host.com"(which doesn't exist), or not
>> >> define
>> >> >> it
>> >> >> >>> at
>> >> >> >>> all, but still, I got the same result.
>> >> >> >>>
>> >> >> >>> Qing
>> >> >> >>>
>> >> >> >>> John Turner wrote:
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>> You have to delete the VirtualHost container from mod_jk.conf
>> >> >> because
>> >> >> >>>> you already have that hostname hardcoded in your httpd.conf.
>> >> >> >>>>
>> >> >> >>>> You want your global Apache ServerName to be something OTHER
>> >> than
>> >> >> any
>> >> >> >>>> of
>> >> >> >>>> your VirtualHost ServerNames....it shouldn't be the same.
>> >> >> >>>>
>> >> >> >>>> John
>> >> >> >>>>
>> >> >> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie
> <xi...@ecopiabio.com>
>> >> >> >>>> wrote:
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>> Hi everyone,
>> >> >> >>>>>
>> >> >> >>>>> I posted this question a few days ago but didn't get any
>> >> answers.
>> >> >> I
>> >> >> >>>>> hope somebody can help me this time because I really 
>> couldn't
>> >> >> >>>>> understand what I didn't wrong.
>> >> >> >>>>>
>> >> >> >>>>> Basically, I get 404-not found error when I tried to access
>> >> >> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, 
>> but
>> >> if
>> > I
>> >> >> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart
>> >> apache,
>> >> >> the
>> >> >> >>>>> above link works fine. Looks like I have problems with my
>> >> virtual
>> >> >> >>>>> host
>> >> >> >>>>> config, so JKMount has to be globle in order to work. I'm
> using
>> >> >> >>>>> apache
>> >> >> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>> >> >> >>>>>
>> >> >> >>>>> I'm attaching main parts of my configration files here. Any
>> > inputs
>> >> >> >>>>> are
>> >> >> >>>>> highly appreciated.  Thanks very much!
>> >> >> >>>>>
>> >> >> >>>>> Qing
>> >> >> >>>>>
>> >> >> >>>>> ####################### httpd.conf
>> >> >> >>>>> ######################################
>> >> >> >>>>> ServerName my.host.com:80
>> >> >> >>>>> UseCanonicalName Off
>> >> >> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>> ####################### mod_jk.conf
>> >> >> >>>>> ######################################
>> >> >> >>>>> <IfModule !mod_jk.c>
>> >> >> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>> >> >> >>>>> </IfModule>
>> >> >> >>>>>
>> >> >> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>> >> >> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>> >> >> >>>>>
>> >> >> >>>>> JkLogLevel info
>> >> >> >>>>>
>> >> >> >>>>> <VirtualHost my.host.com>
>> >> >> >>>>> ServerName my.host.com
>> >> >> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>> >> >> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
>> >> >> >>>>> Options Indexes FollowSymLinks
>> >> >> >>>>> DirectoryIndex index.html index.htm index.jsp
>> >> >> >>>>> </Directory>
>> >> >> >>>>> <Location "/examples/WEB-INF/*">
>> >> >> >>>>> AllowOverride None
>> >> >> >>>>> deny from all
>> >> >> >>>>> </Location>
>> >> >> >>>>> <Location "/examples/META-INF/*">
>> >> >> >>>>> AllowOverride None
>> >> >> >>>>> deny from all
>> >> >> >>>>> </Location>
>> >> >> >>>>> JkMount /examples/jsp/security/protected/j_security_check
>> >> ajp13
>> >> >> >>>>> JkMount /examples/snoop  ajp13
>> >> >> >>>>> JkMount /examples/*  ajp13
>> >> >> >>>>> JkMount /examples/servlet/*  ajp13
>> >> >> >>>>> JkMount /examples/CompressionTest  ajp13
>> >> >> >>>>> JkMount /examples/*.jsp  ajp13
>> >> >> >>>>> JkMount /examples/servletToJsp  ajp13
>> >> >> >>>>> JkMount /examples/SendMailServlet  ajp13
>> >> >> >>>>> </VirtualHost>
>> >> >> >>>>>
>> >> >> >>>>> ####################### server.xml
>> >> >> >>>>> ######################################
>> >> >> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>> >> >> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>> >> >> >>>>> unpackWARs="true" autoDeploy="true">
>> >> >> >>>>> <Context path="/examples" docBase="examples" debug="0"
>> >> >> >>>>> reloadable="true" crossContext="true">
>> >> >> >>>>> <Context path="" docBase="ROOT" debug="0"/>
>> >> >> >>>>> </Host>
>> >> >> >>>>> </Engine>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >> >>>>>
>> >> >>
>> >>
>>
>>>>>>>> ------------------------------------------------------------------- 
>>>>>>>>
>>>>>>>>
>>>>>>>> -
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> -
>> >> >> >>>>> 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
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> 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
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> -------------------------------------------------------------------- >>
>> >>
>> >> -
>> >> >> > 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
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> -- 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
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> -- 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
>> >
>> >
>>
>>
>>
>> -- 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
>
>



-- 
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


Re: Why do I have to delete tag in mod_jk.conf

Posted by Gustavo Lima <li...@opendf.com.br>.
        John,

Just bothering you a little more. IS possible to setup a per domain
management area where that domain just sees it own context?

Thank?s

Gustavo
----- Original Message ----- 
From: "John Turner" <to...@johnturner.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, May 12, 2003 11:41 AM
Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf


>
> I do use the Listener, and I do have something in server.xml for each
> domain.  I take the generated mod_jk.conf file and tweak it slightly (like
> adding the JkMount for *.do).  Keep in mind that I run several production
> servers for a couple dozen domain names and clients...my HOWTOs don't
> describe how to duplicate my setup, they describe how to get up and
running
> with a simple virtual host (localhost is a virtual host for all intents
and
> purposes, just not one you can access from an external node) framework
> using default installs and configurations as much as possible.  Anything
> else is left as an exercise for the reader.  After all, if my boss knew
> anyone could duplicate what I do by reading some docs, I'd be out of a
job.
> ;)
>
> I don't use WAR files, but as far as I know, WAR files = Contexts (in
> general), so if I had to guess, you would do it by accessing the manager
> app on a given virtual host and deploy your WAR file there.
>
> John
>
> On Mon, 12 May 2003 11:28:12 -0300, Gustavo Lima <li...@opendf.com.br>
> wrote:
>
> > John,
> >
> > Thank?s and a couple of questions. Do you put something else on your
> > server.xml for each domain or just for your main domain? As far as I
> > understand you are not using the listener that you suggest in the HOWTO.
> > You
> > edit the mod_jk.conf directly? Last question: How do I link specific war
> > files to their own domains?
> >
> > Thank?s again.
> >
> > Gustavo
> > ----- Original Message ----- From: "John Turner" <tomcat-
> > user@johnturner.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Monday, May 12, 2003 11:05 AM
> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >
> >
> >>
> >> I'm running Tomcat 4.1 and Apache 2 (Solaris).
> >>
> >> My httpd.conf has no global ServerName defined.  It has a wildcard for
> >> NameVirtualHost:
> >>
> >> NameVirtualHost *
> >>
> >> My mod_jk.conf files look like this:
> >>
> >> <VirtualHost *>
> >> ServerName host.domain.com
> >> DocumentRoot /usr/local/tomcat/webapps/host
> >> # Static files
> >> Alias /myApp "/usr/local/tomcat/webapps/myApp"
> >> <Directory "/usr/local/tomcat/webapps/myApp">
> >> Options Indexes FollowSymLinks
> >> DirectoryIndex index.jsp
> >> </Directory>
> >> <Location "/myApp/WEB-INF/*">
> >> AllowOverride None
> >> deny from all
> >> </Location>
> >> <Location "/myApp/META-INF/*">
> >> AllowOverride None
> >> deny from all
> >> </Location>
> >> JkMount /myApp/*.do  ajp13
> >> JkMount /myApp/*.jsp  ajp13
> >> </VirtualHost>
> >>
> >> I tweak the JkMount (adding *.do for Struts, for example), so I don't
> >> use
> >> the output of the ApacheConfig classes directly, but I do use
> >> mod_jk.conf
> >> as much as I can, with as little modification as I can.  Right now,
> >> there
> >> are 11 VirtualHost containers in my mod_jk.conf, each one very similar
> >> to
> >> the one shown above, the only difference being the different values for
> >> "host.domain.com" and the different webapp roots.
> >>
> >> I have some Tomcat 3 servers that do pretty much the same thing, but
> >> with
> >> mod_jserv...there are 22 virtual hosts there.
> >>
> >> John
> >>
> >> On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima <li...@opendf.com.br>
> >> wrote:
> >>
> >> > Hi John,
> >> >
> >> > Maybe you have answered this question a thousand times but I?m not
> >> able
> >> > to
> >> > find on list archives. How are you using these 10-12 virtual hosts
> >> > exactly?
> >> >
> >> > Thank?s for your help.
> >> >
> >> > Gustavo
> >> > ----- Original Message ----- From: "John Turner" <tomcat-
> >> > user@johnturner.com>
> >> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> >> > Sent: Monday, May 12, 2003 9:22 AM
> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >> >
> >> >
> >> >>
> >> >> Well, I think there is something else going on, most likely with
your
> >> >> Apache configuration.
> >> >>
> >> >> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
> >> > auto-generation,
> >> >> and 10-12 virtual hosts, and it works like a champ.
> >> >>
> >> >> John
> >> >>
> >> >> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman
> > <b....@attbi.com>
> >> >> wrote:
> >> >>
> >> >> > I think the second problem (having to manually define all of your
> >> >> > contexts)
> >> >> > could be solved if the <DefaultContext> would accept a <Listener>
> >> >> inside
> >> >> > it - which is allowed according to the documentation, but I never
> >> got
> >> >> it
> >> >> > working and ultimately decided that auto-deploying applications
and
> >> >> > having
> >> >> > them linked through to Apache wasn't what I was after...  If
> >> someone
> >> > else
> >> >> > has a suggestion to make a Listener work within a DefaultContext,
> >> I'd
> >> >> > love
> >> >> > to hear the solution!
> >> >> >
> >> >> > Thanks,
> >> >> > Brian
> >> >> >
> >> >> > -----Original Message-----
> >> >> > From: Qing Xie [mailto:xie@ecopiabio.com]
> >> >> > Sent: Friday, May 09, 2003 2:28 PM
> >> >> > To: Tomcat Users List
> >> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in
> >> mod_jk.conf
> >> >> >
> >> >> >
> >> >> > Hi Brian,
> >> >> >
> >> >> > This did remove the <VirtualHost> tag in mod_jk.conf and solved
the
> >> >> > problem, but it caused another problem which is that I have to
> >> define
> >> >> a
> >> >> > context for each application and place the listener there,
> >> otherwise,
> >> >> > the JKMounts are not generated.
> >> >> >
> >> >> > I'm glad I have this option because at least, I don't have to
> >> modify
> >> >> > mod_jk.conf every time I restart tomcat.
> >> >> >
> >> >> > Thank you very much :-)
> >> >> >
> >> >> > Qing
> >> >> >
> >> >> > Brian Briggman wrote:
> >> >> >
> >> >> >> Another option may be to remove your Listener in server.xml from
> >> >> right
> >> >> > under
> >> >> >> the <Host> (this is why you're getting a virtual host in
> > mod_jk.conf)
> >> >> ,
> >> >> >> and
> >> >> >> instead place a Listener under each <Context> which will cause
all
> > of
> >> >> >> the
> >> >> >> same JKMounts to get generated in mod_jk.conf, just not nested
> > within
> >> >> a
> >> >> >> virtual host.
> >> >> >>
> >> >> >> Brian
> >> >> >>
> >> >> >> -----Original Message-----
> >> >> >> From: John Turner [mailto:tomcat-user@johnturner.com]
> >> >> >> Sent: Friday, May 09, 2003 11:57 AM
> >> >> >> To: Tomcat Users List
> >> >> >> Subject: Re: Why do I have to delete <VirtualHost> tag in
> > mod_jk.conf
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> I would try disabling Apache's global ServerName, and making sure
> > you
> >> >> >> have
> >> >> >> this in httpd.conf:
> >> >> >>
> >> >> >> NameVirtualHost *
> >> >> >>
> >> >> >> John
> >> >> >>
> >> >> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com>
> >> >> wrote:
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>> Hi John,
> >> >> >>>
> >> >> >>> Thanks so much for helping me again.
> >> >> >>>
> >> >> >>> I've tried to change my global Apache ServerName to something
> >> else,
> >> >> >>> such
> >> >> >>> as "localhost", "some.host.com"(which doesn't exist), or not
> >> define
> >> >> it
> >> >> >>> at
> >> >> >>> all, but still, I got the same result.
> >> >> >>>
> >> >> >>> Qing
> >> >> >>>
> >> >> >>> John Turner wrote:
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>> You have to delete the VirtualHost container from mod_jk.conf
> >> >> because
> >> >> >>>> you already have that hostname hardcoded in your httpd.conf.
> >> >> >>>>
> >> >> >>>> You want your global Apache ServerName to be something OTHER
> >> than
> >> >> any
> >> >> >>>> of
> >> >> >>>> your VirtualHost ServerNames....it shouldn't be the same.
> >> >> >>>>
> >> >> >>>> John
> >> >> >>>>
> >> >> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie
<xi...@ecopiabio.com>
> >> >> >>>> wrote:
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>> Hi everyone,
> >> >> >>>>>
> >> >> >>>>> I posted this question a few days ago but didn't get any
> >> answers.
> >> >> I
> >> >> >>>>> hope somebody can help me this time because I really couldn't
> >> >> >>>>> understand what I didn't wrong.
> >> >> >>>>>
> >> >> >>>>> Basically, I get 404-not found error when I tried to access
> >> >> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but
> >> if
> > I
> >> >> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart
> >> apache,
> >> >> the
> >> >> >>>>> above link works fine. Looks like I have problems with my
> >> virtual
> >> >> >>>>> host
> >> >> >>>>> config, so JKMount has to be globle in order to work. I'm
using
> >> >> >>>>> apache
> >> >> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
> >> >> >>>>>
> >> >> >>>>> I'm attaching main parts of my configration files here. Any
> > inputs
> >> >> >>>>> are
> >> >> >>>>> highly appreciated.  Thanks very much!
> >> >> >>>>>
> >> >> >>>>> Qing
> >> >> >>>>>
> >> >> >>>>> ####################### httpd.conf
> >> >> >>>>> ######################################
> >> >> >>>>> ServerName my.host.com:80
> >> >> >>>>> UseCanonicalName Off
> >> >> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>> ####################### mod_jk.conf
> >> >> >>>>> ######################################
> >> >> >>>>> <IfModule !mod_jk.c>
> >> >> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
> >> >> >>>>> </IfModule>
> >> >> >>>>>
> >> >> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
> >> >> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
> >> >> >>>>>
> >> >> >>>>> JkLogLevel info
> >> >> >>>>>
> >> >> >>>>> <VirtualHost my.host.com>
> >> >> >>>>> ServerName my.host.com
> >> >> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
> >> >> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
> >> >> >>>>> Options Indexes FollowSymLinks
> >> >> >>>>> DirectoryIndex index.html index.htm index.jsp
> >> >> >>>>> </Directory>
> >> >> >>>>> <Location "/examples/WEB-INF/*">
> >> >> >>>>> AllowOverride None
> >> >> >>>>> deny from all
> >> >> >>>>> </Location>
> >> >> >>>>> <Location "/examples/META-INF/*">
> >> >> >>>>> AllowOverride None
> >> >> >>>>> deny from all
> >> >> >>>>> </Location>
> >> >> >>>>> JkMount /examples/jsp/security/protected/j_security_check
> >> ajp13
> >> >> >>>>> JkMount /examples/snoop  ajp13
> >> >> >>>>> JkMount /examples/*  ajp13
> >> >> >>>>> JkMount /examples/servlet/*  ajp13
> >> >> >>>>> JkMount /examples/CompressionTest  ajp13
> >> >> >>>>> JkMount /examples/*.jsp  ajp13
> >> >> >>>>> JkMount /examples/servletToJsp  ajp13
> >> >> >>>>> JkMount /examples/SendMailServlet  ajp13
> >> >> >>>>> </VirtualHost>
> >> >> >>>>>
> >> >> >>>>> ####################### server.xml
> >> >> >>>>> ######################################
> >> >> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
> >> >> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
> >> >> >>>>> unpackWARs="true" autoDeploy="true">
> >> >> >>>>> <Context path="/examples" docBase="examples" debug="0"
> >> >> >>>>> reloadable="true" crossContext="true">
> >> >> >>>>> <Context path="" docBase="ROOT" debug="0"/>
> >> >> >>>>> </Host>
> >> >> >>>>> </Engine>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >>
> >>
>
>>>>>>> -------------------------------------------------------------------- 
> >>>>>>>
> >>>>>>>
> >>>>>>> -
> >> >> >>>>> 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
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> 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
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >>
> -------------------------------------------------------------------- 
> >>
> >>
> >> -
> >> >> > 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
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> -- 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
> >> >
> >> >
> >>
> >>
> >>
> >> -- 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
> >
> >
>
>
>
> -- 
> 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: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
I do use the Listener, and I do have something in server.xml for each 
domain.  I take the generated mod_jk.conf file and tweak it slightly (like 
adding the JkMount for *.do).  Keep in mind that I run several production 
servers for a couple dozen domain names and clients...my HOWTOs don't 
describe how to duplicate my setup, they describe how to get up and running 
with a simple virtual host (localhost is a virtual host for all intents and 
purposes, just not one you can access from an external node) framework 
using default installs and configurations as much as possible.  Anything 
else is left as an exercise for the reader.  After all, if my boss knew 
anyone could duplicate what I do by reading some docs, I'd be out of a job. 
;)

I don't use WAR files, but as far as I know, WAR files = Contexts (in 
general), so if I had to guess, you would do it by accessing the manager 
app on a given virtual host and deploy your WAR file there.

John

On Mon, 12 May 2003 11:28:12 -0300, Gustavo Lima <li...@opendf.com.br> 
wrote:

> John,
>
> Thank?s and a couple of questions. Do you put something else on your
> server.xml for each domain or just for your main domain? As far as I
> understand you are not using the listener that you suggest in the HOWTO. 
> You
> edit the mod_jk.conf directly? Last question: How do I link specific war
> files to their own domains?
>
> Thank?s again.
>
> Gustavo
> ----- Original Message ----- From: "John Turner" <tomcat- 
> user@johnturner.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, May 12, 2003 11:05 AM
> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
>>
>> I'm running Tomcat 4.1 and Apache 2 (Solaris).
>>
>> My httpd.conf has no global ServerName defined.  It has a wildcard for
>> NameVirtualHost:
>>
>> NameVirtualHost *
>>
>> My mod_jk.conf files look like this:
>>
>> <VirtualHost *>
>> ServerName host.domain.com
>> DocumentRoot /usr/local/tomcat/webapps/host
>> # Static files
>> Alias /myApp "/usr/local/tomcat/webapps/myApp"
>> <Directory "/usr/local/tomcat/webapps/myApp">
>> Options Indexes FollowSymLinks
>> DirectoryIndex index.jsp
>> </Directory>
>> <Location "/myApp/WEB-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>> <Location "/myApp/META-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>> JkMount /myApp/*.do  ajp13
>> JkMount /myApp/*.jsp  ajp13
>> </VirtualHost>
>>
>> I tweak the JkMount (adding *.do for Struts, for example), so I don't 
>> use
>> the output of the ApacheConfig classes directly, but I do use 
>> mod_jk.conf
>> as much as I can, with as little modification as I can.  Right now, 
>> there
>> are 11 VirtualHost containers in my mod_jk.conf, each one very similar 
>> to
>> the one shown above, the only difference being the different values for
>> "host.domain.com" and the different webapp roots.
>>
>> I have some Tomcat 3 servers that do pretty much the same thing, but 
>> with
>> mod_jserv...there are 22 virtual hosts there.
>>
>> John
>>
>> On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima <li...@opendf.com.br>
>> wrote:
>>
>> > Hi John,
>> >
>> > Maybe you have answered this question a thousand times but I?m not 
>> able
>> > to
>> > find on list archives. How are you using these 10-12 virtual hosts
>> > exactly?
>> >
>> > Thank?s for your help.
>> >
>> > Gustavo
>> > ----- Original Message ----- From: "John Turner" <tomcat-
>> > user@johnturner.com>
>> > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> > Sent: Monday, May 12, 2003 9:22 AM
>> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>> >
>> >
>> >>
>> >> Well, I think there is something else going on, most likely with your
>> >> Apache configuration.
>> >>
>> >> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
>> > auto-generation,
>> >> and 10-12 virtual hosts, and it works like a champ.
>> >>
>> >> John
>> >>
>> >> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman
> <b....@attbi.com>
>> >> wrote:
>> >>
>> >> > I think the second problem (having to manually define all of your
>> >> > contexts)
>> >> > could be solved if the <DefaultContext> would accept a <Listener>
>> >> inside
>> >> > it - which is allowed according to the documentation, but I never 
>> got
>> >> it
>> >> > working and ultimately decided that auto-deploying applications and
>> >> > having
>> >> > them linked through to Apache wasn't what I was after...  If 
>> someone
>> > else
>> >> > has a suggestion to make a Listener work within a DefaultContext, 
>> I'd
>> >> > love
>> >> > to hear the solution!
>> >> >
>> >> > Thanks,
>> >> > Brian
>> >> >
>> >> > -----Original Message-----
>> >> > From: Qing Xie [mailto:xie@ecopiabio.com]
>> >> > Sent: Friday, May 09, 2003 2:28 PM
>> >> > To: Tomcat Users List
>> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in 
>> mod_jk.conf
>> >> >
>> >> >
>> >> > Hi Brian,
>> >> >
>> >> > This did remove the <VirtualHost> tag in mod_jk.conf and solved the
>> >> > problem, but it caused another problem which is that I have to 
>> define
>> >> a
>> >> > context for each application and place the listener there, 
>> otherwise,
>> >> > the JKMounts are not generated.
>> >> >
>> >> > I'm glad I have this option because at least, I don't have to 
>> modify
>> >> > mod_jk.conf every time I restart tomcat.
>> >> >
>> >> > Thank you very much :-)
>> >> >
>> >> > Qing
>> >> >
>> >> > Brian Briggman wrote:
>> >> >
>> >> >> Another option may be to remove your Listener in server.xml from
>> >> right
>> >> > under
>> >> >> the <Host> (this is why you're getting a virtual host in
> mod_jk.conf)
>> >> ,
>> >> >> and
>> >> >> instead place a Listener under each <Context> which will cause all
> of
>> >> >> the
>> >> >> same JKMounts to get generated in mod_jk.conf, just not nested
> within
>> >> a
>> >> >> virtual host.
>> >> >>
>> >> >> Brian
>> >> >>
>> >> >> -----Original Message-----
>> >> >> From: John Turner [mailto:tomcat-user@johnturner.com]
>> >> >> Sent: Friday, May 09, 2003 11:57 AM
>> >> >> To: Tomcat Users List
>> >> >> Subject: Re: Why do I have to delete <VirtualHost> tag in
> mod_jk.conf
>> >> >>
>> >> >>
>> >> >>
>> >> >> I would try disabling Apache's global ServerName, and making sure
> you
>> >> >> have
>> >> >> this in httpd.conf:
>> >> >>
>> >> >> NameVirtualHost *
>> >> >>
>> >> >> John
>> >> >>
>> >> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com>
>> >> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >>> Hi John,
>> >> >>>
>> >> >>> Thanks so much for helping me again.
>> >> >>>
>> >> >>> I've tried to change my global Apache ServerName to something 
>> else,
>> >> >>> such
>> >> >>> as "localhost", "some.host.com"(which doesn't exist), or not 
>> define
>> >> it
>> >> >>> at
>> >> >>> all, but still, I got the same result.
>> >> >>>
>> >> >>> Qing
>> >> >>>
>> >> >>> John Turner wrote:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>> You have to delete the VirtualHost container from mod_jk.conf
>> >> because
>> >> >>>> you already have that hostname hardcoded in your httpd.conf.
>> >> >>>>
>> >> >>>> You want your global Apache ServerName to be something OTHER 
>> than
>> >> any
>> >> >>>> of
>> >> >>>> your VirtualHost ServerNames....it shouldn't be the same.
>> >> >>>>
>> >> >>>> John
>> >> >>>>
>> >> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com>
>> >> >>>> wrote:
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>>> Hi everyone,
>> >> >>>>>
>> >> >>>>> I posted this question a few days ago but didn't get any 
>> answers.
>> >> I
>> >> >>>>> hope somebody can help me this time because I really couldn't
>> >> >>>>> understand what I didn't wrong.
>> >> >>>>>
>> >> >>>>> Basically, I get 404-not found error when I tried to access
>> >> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but 
>> if
> I
>> >> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart 
>> apache,
>> >> the
>> >> >>>>> above link works fine. Looks like I have problems with my 
>> virtual
>> >> >>>>> host
>> >> >>>>> config, so JKMount has to be globle in order to work. I'm using
>> >> >>>>> apache
>> >> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>> >> >>>>>
>> >> >>>>> I'm attaching main parts of my configration files here. Any
> inputs
>> >> >>>>> are
>> >> >>>>> highly appreciated.  Thanks very much!
>> >> >>>>>
>> >> >>>>> Qing
>> >> >>>>>
>> >> >>>>> ####################### httpd.conf
>> >> >>>>> ######################################
>> >> >>>>> ServerName my.host.com:80
>> >> >>>>> UseCanonicalName Off
>> >> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> ####################### mod_jk.conf
>> >> >>>>> ######################################
>> >> >>>>> <IfModule !mod_jk.c>
>> >> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>> >> >>>>> </IfModule>
>> >> >>>>>
>> >> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>> >> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>> >> >>>>>
>> >> >>>>> JkLogLevel info
>> >> >>>>>
>> >> >>>>> <VirtualHost my.host.com>
>> >> >>>>> ServerName my.host.com
>> >> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>> >> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
>> >> >>>>> Options Indexes FollowSymLinks
>> >> >>>>> DirectoryIndex index.html index.htm index.jsp
>> >> >>>>> </Directory>
>> >> >>>>> <Location "/examples/WEB-INF/*">
>> >> >>>>> AllowOverride None
>> >> >>>>> deny from all
>> >> >>>>> </Location>
>> >> >>>>> <Location "/examples/META-INF/*">
>> >> >>>>> AllowOverride None
>> >> >>>>> deny from all
>> >> >>>>> </Location>
>> >> >>>>> JkMount /examples/jsp/security/protected/j_security_check  
>> ajp13
>> >> >>>>> JkMount /examples/snoop  ajp13
>> >> >>>>> JkMount /examples/*  ajp13
>> >> >>>>> JkMount /examples/servlet/*  ajp13
>> >> >>>>> JkMount /examples/CompressionTest  ajp13
>> >> >>>>> JkMount /examples/*.jsp  ajp13
>> >> >>>>> JkMount /examples/servletToJsp  ajp13
>> >> >>>>> JkMount /examples/SendMailServlet  ajp13
>> >> >>>>> </VirtualHost>
>> >> >>>>>
>> >> >>>>> ####################### server.xml
>> >> >>>>> ######################################
>> >> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>> >> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>> >> >>>>> unpackWARs="true" autoDeploy="true">
>> >> >>>>> <Context path="/examples" docBase="examples" debug="0"
>> >> >>>>> reloadable="true" crossContext="true">
>> >> >>>>> <Context path="" docBase="ROOT" debug="0"/>
>> >> >>>>> </Host>
>> >> >>>>> </Engine>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >>
>>
>>>>>>> -------------------------------------------------------------------- 
>>>>>>>
>>>>>>>
>>>>>>> -
>> >> >>>>> 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
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > -------------------------------------------------------------------- 
>>
>>
>> -
>> >> > 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
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> -- 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
>> >
>> >
>>
>>
>>
>> -- 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
>
>



-- 
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


Re: Why do I have to delete tag in mod_jk.conf

Posted by Gustavo Lima <li...@opendf.com.br>.
John,

Thank?s and a couple of questions. Do you put something else on your
server.xml for each domain or just for your main domain? As far as I
understand you are not using the listener that you suggest in the HOWTO. You
edit the mod_jk.conf directly? Last question: How do I link specific war
files to their own domains?

Thank?s again.

Gustavo
----- Original Message ----- 
From: "John Turner" <to...@johnturner.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, May 12, 2003 11:05 AM
Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf


>
> I'm running Tomcat 4.1 and Apache 2 (Solaris).
>
> My httpd.conf has no global ServerName defined.  It has a wildcard for
> NameVirtualHost:
>
> NameVirtualHost *
>
> My mod_jk.conf files look like this:
>
> <VirtualHost *>
>     ServerName host.domain.com
>     DocumentRoot /usr/local/tomcat/webapps/host
>     # Static files
>     Alias /myApp "/usr/local/tomcat/webapps/myApp"
>     <Directory "/usr/local/tomcat/webapps/myApp">
>         Options Indexes FollowSymLinks
>         DirectoryIndex index.jsp
>     </Directory>
>     <Location "/myApp/WEB-INF/*">
>         AllowOverride None
>         deny from all
>     </Location>
>     <Location "/myApp/META-INF/*">
>         AllowOverride None
>         deny from all
>     </Location>
>     JkMount /myApp/*.do  ajp13
>     JkMount /myApp/*.jsp  ajp13
> </VirtualHost>
>
> I tweak the JkMount (adding *.do for Struts, for example), so I don't use
> the output of the ApacheConfig classes directly, but I do use mod_jk.conf
> as much as I can, with as little modification as I can.  Right now, there
> are 11 VirtualHost containers in my mod_jk.conf, each one very similar to
> the one shown above, the only difference being the different values for
> "host.domain.com" and the different webapp roots.
>
> I have some Tomcat 3 servers that do pretty much the same thing, but with
> mod_jserv...there are 22 virtual hosts there.
>
> John
>
> On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima <li...@opendf.com.br>
> wrote:
>
> > Hi John,
> >
> > Maybe you have answered this question a thousand times but I?m not able
> > to
> > find on list archives. How are you using these 10-12 virtual hosts
> > exactly?
> >
> > Thank?s for your help.
> >
> > Gustavo
> > ----- Original Message ----- From: "John Turner" <tomcat-
> > user@johnturner.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Monday, May 12, 2003 9:22 AM
> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >
> >
> >>
> >> Well, I think there is something else going on, most likely with your
> >> Apache configuration.
> >>
> >> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
> > auto-generation,
> >> and 10-12 virtual hosts, and it works like a champ.
> >>
> >> John
> >>
> >> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman
<b....@attbi.com>
> >> wrote:
> >>
> >> > I think the second problem (having to manually define all of your
> >> > contexts)
> >> > could be solved if the <DefaultContext> would accept a <Listener>
> >> inside
> >> > it - which is allowed according to the documentation, but I never got
> >> it
> >> > working and ultimately decided that auto-deploying applications and
> >> > having
> >> > them linked through to Apache wasn't what I was after...  If someone
> > else
> >> > has a suggestion to make a Listener work within a DefaultContext, I'd
> >> > love
> >> > to hear the solution!
> >> >
> >> > Thanks,
> >> > Brian
> >> >
> >> > -----Original Message-----
> >> > From: Qing Xie [mailto:xie@ecopiabio.com]
> >> > Sent: Friday, May 09, 2003 2:28 PM
> >> > To: Tomcat Users List
> >> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >> >
> >> >
> >> > Hi Brian,
> >> >
> >> > This did remove the <VirtualHost> tag in mod_jk.conf and solved the
> >> > problem, but it caused another problem which is that I have to define
> >> a
> >> > context for each application and place the listener there, otherwise,
> >> > the JKMounts are not generated.
> >> >
> >> > I'm glad I have this option because at least, I don't have to modify
> >> > mod_jk.conf every time I restart tomcat.
> >> >
> >> > Thank you very much :-)
> >> >
> >> > Qing
> >> >
> >> > Brian Briggman wrote:
> >> >
> >> >> Another option may be to remove your Listener in server.xml from
> >> right
> >> > under
> >> >> the <Host> (this is why you're getting a virtual host in
mod_jk.conf)
> >> ,
> >> >> and
> >> >> instead place a Listener under each <Context> which will cause all
of
> >> >> the
> >> >> same JKMounts to get generated in mod_jk.conf, just not nested
within
> >> a
> >> >> virtual host.
> >> >>
> >> >> Brian
> >> >>
> >> >> -----Original Message-----
> >> >> From: John Turner [mailto:tomcat-user@johnturner.com]
> >> >> Sent: Friday, May 09, 2003 11:57 AM
> >> >> To: Tomcat Users List
> >> >> Subject: Re: Why do I have to delete <VirtualHost> tag in
mod_jk.conf
> >> >>
> >> >>
> >> >>
> >> >> I would try disabling Apache's global ServerName, and making sure
you
> >> >> have
> >> >> this in httpd.conf:
> >> >>
> >> >> NameVirtualHost *
> >> >>
> >> >> John
> >> >>
> >> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com>
> >> wrote:
> >> >>
> >> >>
> >> >>
> >> >>> Hi John,
> >> >>>
> >> >>> Thanks so much for helping me again.
> >> >>>
> >> >>> I've tried to change my global Apache ServerName to something else,
> >> >>> such
> >> >>> as "localhost", "some.host.com"(which doesn't exist), or not define
> >> it
> >> >>> at
> >> >>> all, but still, I got the same result.
> >> >>>
> >> >>> Qing
> >> >>>
> >> >>> John Turner wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>>> You have to delete the VirtualHost container from mod_jk.conf
> >> because
> >> >>>> you already have that hostname hardcoded in your httpd.conf.
> >> >>>>
> >> >>>> You want your global Apache ServerName to be something OTHER than
> >> any
> >> >>>> of
> >> >>>> your VirtualHost ServerNames....it shouldn't be the same.
> >> >>>>
> >> >>>> John
> >> >>>>
> >> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com>
> >> >>>> wrote:
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>>> Hi everyone,
> >> >>>>>
> >> >>>>> I posted this question a few days ago but didn't get any answers.
> >> I
> >> >>>>> hope somebody can help me this time because I really couldn't
> >> >>>>> understand what I didn't wrong.
> >> >>>>>
> >> >>>>> Basically, I get 404-not found error when I tried to access
> >> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if
I
> >> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache,
> >> the
> >> >>>>> above link works fine. Looks like I have problems with my virtual
> >> >>>>> host
> >> >>>>> config, so JKMount has to be globle in order to work. I'm using
> >> >>>>> apache
> >> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
> >> >>>>>
> >> >>>>> I'm attaching main parts of my configration files here. Any
inputs
> >> >>>>> are
> >> >>>>> highly appreciated.  Thanks very much!
> >> >>>>>
> >> >>>>> Qing
> >> >>>>>
> >> >>>>> ####################### httpd.conf
> >> >>>>> ######################################
> >> >>>>> ServerName my.host.com:80
> >> >>>>> UseCanonicalName Off
> >> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
> >> >>>>>
> >> >>>>>
> >> >>>>> ####################### mod_jk.conf
> >> >>>>> ######################################
> >> >>>>> <IfModule !mod_jk.c>
> >> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
> >> >>>>> </IfModule>
> >> >>>>>
> >> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
> >> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
> >> >>>>>
> >> >>>>> JkLogLevel info
> >> >>>>>
> >> >>>>> <VirtualHost my.host.com>
> >> >>>>> ServerName my.host.com
> >> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
> >> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
> >> >>>>> Options Indexes FollowSymLinks
> >> >>>>> DirectoryIndex index.html index.htm index.jsp
> >> >>>>> </Directory>
> >> >>>>> <Location "/examples/WEB-INF/*">
> >> >>>>> AllowOverride None
> >> >>>>> deny from all
> >> >>>>> </Location>
> >> >>>>> <Location "/examples/META-INF/*">
> >> >>>>> AllowOverride None
> >> >>>>> deny from all
> >> >>>>> </Location>
> >> >>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
> >> >>>>> JkMount /examples/snoop  ajp13
> >> >>>>> JkMount /examples/*  ajp13
> >> >>>>> JkMount /examples/servlet/*  ajp13
> >> >>>>> JkMount /examples/CompressionTest  ajp13
> >> >>>>> JkMount /examples/*.jsp  ajp13
> >> >>>>> JkMount /examples/servletToJsp  ajp13
> >> >>>>> JkMount /examples/SendMailServlet  ajp13
> >> >>>>> </VirtualHost>
> >> >>>>>
> >> >>>>> ####################### server.xml
> >> >>>>> ######################################
> >> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
> >> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
> >> >>>>> unpackWARs="true" autoDeploy="true">
> >> >>>>> <Context path="/examples" docBase="examples" debug="0"
> >> >>>>> reloadable="true" crossContext="true">
> >> >>>>> <Context path="" docBase="ROOT" debug="0"/>
> >> >>>>> </Host>
> >> >>>>> </Engine>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >>
>
>>>>>> ---------------------------------------------------------------------
> >> >>>>> 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
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> 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
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > 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
> >> >
> >> >
> >>
> >>
> >>
> >> -- 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
> >
> >
>
>
>
> -- 
> 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: Why do I have to delete tag in mod_jk.conf

Posted by Qing Xie <xi...@ecopiabio.com>.
I did the following tweak and then it works:

In httpd.conf,
1. undefine ServerName
2. Change "NameVirtualHost www.domain.com"  to "NameVirtualHost *"

Modify mod_jk.conf
Change <VirtualHost  www.domain.com> to <VirtualHost  *>

The new questions are:
1. Can I configure tomcat to generate <VirtualHost  *> instead of 
<VirtualHost  www.domain.com> in mod_jk.conf file?
2. Can I configure tomcat to generate DocumentRoot also?

Thanks,

Qing

John Turner wrote:

>
> I'm running Tomcat 4.1 and Apache 2 (Solaris).
>
> My httpd.conf has no global ServerName defined.  It has a wildcard for 
> NameVirtualHost:
>
> NameVirtualHost *
>
> My mod_jk.conf files look like this:
>
> <VirtualHost *>
>    ServerName host.domain.com
>    DocumentRoot /usr/local/tomcat/webapps/host
>    # Static files
>    Alias /myApp "/usr/local/tomcat/webapps/myApp"
>    <Directory "/usr/local/tomcat/webapps/myApp">
>        Options Indexes FollowSymLinks
>        DirectoryIndex index.jsp
>    </Directory>
>    <Location "/myApp/WEB-INF/*">
>        AllowOverride None
>        deny from all
>    </Location>
>    <Location "/myApp/META-INF/*">
>        AllowOverride None
>        deny from all
>    </Location>
>    JkMount /myApp/*.do  ajp13
>    JkMount /myApp/*.jsp  ajp13
> </VirtualHost>
>
> I tweak the JkMount (adding *.do for Struts, for example), so I don't 
> use the output of the ApacheConfig classes directly, but I do use 
> mod_jk.conf as much as I can, with as little modification as I can.  
> Right now, there are 11 VirtualHost containers in my mod_jk.conf, each 
> one very similar to the one shown above, the only difference being the 
> different values for "host.domain.com" and the different webapp roots.
>
> I have some Tomcat 3 servers that do pretty much the same thing, but 
> with mod_jserv...there are 22 virtual hosts there.
>
> John
>
> On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima 
> <li...@opendf.com.br> wrote:
>
>> Hi John,
>>
>> Maybe you have answered this question a thousand times but I?m not 
>> able to
>> find on list archives. How are you using these 10-12 virtual hosts 
>> exactly?
>>
>> Thank?s for your help.
>>
>> Gustavo
>> ----- Original Message ----- From: "John Turner" <tomcat- 
>> user@johnturner.com>
>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>> Sent: Monday, May 12, 2003 9:22 AM
>> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>>
>>
>>>
>>> Well, I think there is something else going on, most likely with your
>>> Apache configuration.
>>>
>>> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
>>
>> auto-generation,
>>
>>> and 10-12 virtual hosts, and it works like a champ.
>>>
>>> John
>>>
>>> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman 
>>> <b....@attbi.com>
>>> wrote:
>>>
>>> > I think the second problem (having to manually define all of your
>>> > contexts)
>>> > could be solved if the <DefaultContext> would accept a <Listener> 
>>> inside
>>> > it - which is allowed according to the documentation, but I never 
>>> got it
>>> > working and ultimately decided that auto-deploying applications and
>>> > having
>>> > them linked through to Apache wasn't what I was after...  If someone
>>
>> else
>>
>>> > has a suggestion to make a Listener work within a DefaultContext, I'd
>>> > love
>>> > to hear the solution!
>>> >
>>> > Thanks,
>>> > Brian
>>> >
>>> > -----Original Message-----
>>> > From: Qing Xie [mailto:xie@ecopiabio.com]
>>> > Sent: Friday, May 09, 2003 2:28 PM
>>> > To: Tomcat Users List
>>> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>>> >
>>> >
>>> > Hi Brian,
>>> >
>>> > This did remove the <VirtualHost> tag in mod_jk.conf and solved the
>>> > problem, but it caused another problem which is that I have to 
>>> define a
>>> > context for each application and place the listener there, otherwise,
>>> > the JKMounts are not generated.
>>> >
>>> > I'm glad I have this option because at least, I don't have to modify
>>> > mod_jk.conf every time I restart tomcat.
>>> >
>>> > Thank you very much :-)
>>> >
>>> > Qing
>>> >
>>> > Brian Briggman wrote:
>>> >
>>> >> Another option may be to remove your Listener in server.xml from 
>>> right
>>> > under
>>> >> the <Host> (this is why you're getting a virtual host in 
>>> mod_jk.conf) ,
>>> >> and
>>> >> instead place a Listener under each <Context> which will cause 
>>> all of
>>> >> the
>>> >> same JKMounts to get generated in mod_jk.conf, just not nested 
>>> within a
>>> >> virtual host.
>>> >>
>>> >> Brian
>>> >>
>>> >> -----Original Message-----
>>> >> From: John Turner [mailto:tomcat-user@johnturner.com]
>>> >> Sent: Friday, May 09, 2003 11:57 AM
>>> >> To: Tomcat Users List
>>> >> Subject: Re: Why do I have to delete <VirtualHost> tag in 
>>> mod_jk.conf
>>> >>
>>> >>
>>> >>
>>> >> I would try disabling Apache's global ServerName, and making sure 
>>> you
>>> >> have
>>> >> this in httpd.conf:
>>> >>
>>> >> NameVirtualHost *
>>> >>
>>> >> John
>>> >>
>>> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> 
>>> wrote:
>>> >>
>>> >>
>>> >>
>>> >>> Hi John,
>>> >>>
>>> >>> Thanks so much for helping me again.
>>> >>>
>>> >>> I've tried to change my global Apache ServerName to something else,
>>> >>> such
>>> >>> as "localhost", "some.host.com"(which doesn't exist), or not 
>>> define it
>>> >>> at
>>> >>> all, but still, I got the same result.
>>> >>>
>>> >>> Qing
>>> >>>
>>> >>> John Turner wrote:
>>> >>>
>>> >>>
>>> >>>
>>> >>>> You have to delete the VirtualHost container from mod_jk.conf 
>>> because
>>> >>>> you already have that hostname hardcoded in your httpd.conf.
>>> >>>>
>>> >>>> You want your global Apache ServerName to be something OTHER 
>>> than any
>>> >>>> of
>>> >>>> your VirtualHost ServerNames....it shouldn't be the same.
>>> >>>>
>>> >>>> John
>>> >>>>
>>> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com>
>>> >>>> wrote:
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>>> Hi everyone,
>>> >>>>>
>>> >>>>> I posted this question a few days ago but didn't get any 
>>> answers. I
>>> >>>>> hope somebody can help me this time because I really couldn't
>>> >>>>> understand what I didn't wrong.
>>> >>>>>
>>> >>>>> Basically, I get 404-not found error when I tried to access
>>> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but 
>>> if I
>>> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart 
>>> apache, the
>>> >>>>> above link works fine. Looks like I have problems with my virtual
>>> >>>>> host
>>> >>>>> config, so JKMount has to be globle in order to work. I'm using
>>> >>>>> apache
>>> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>> >>>>>
>>> >>>>> I'm attaching main parts of my configration files here. Any 
>>> inputs
>>> >>>>> are
>>> >>>>> highly appreciated.  Thanks very much!
>>> >>>>>
>>> >>>>> Qing
>>> >>>>>
>>> >>>>> ####################### httpd.conf
>>> >>>>> ######################################
>>> >>>>> ServerName my.host.com:80
>>> >>>>> UseCanonicalName Off
>>> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>> >>>>>
>>> >>>>>
>>> >>>>> ####################### mod_jk.conf
>>> >>>>> ######################################
>>> >>>>> <IfModule !mod_jk.c>
>>> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>>> >>>>> </IfModule>
>>> >>>>>
>>> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>> >>>>>
>>> >>>>> JkLogLevel info
>>> >>>>>
>>> >>>>> <VirtualHost my.host.com>
>>> >>>>> ServerName my.host.com
>>> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>>> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
>>> >>>>> Options Indexes FollowSymLinks
>>> >>>>> DirectoryIndex index.html index.htm index.jsp
>>> >>>>> </Directory>
>>> >>>>> <Location "/examples/WEB-INF/*">
>>> >>>>> AllowOverride None
>>> >>>>> deny from all
>>> >>>>> </Location>
>>> >>>>> <Location "/examples/META-INF/*">
>>> >>>>> AllowOverride None
>>> >>>>> deny from all
>>> >>>>> </Location>
>>> >>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>> >>>>> JkMount /examples/snoop  ajp13
>>> >>>>> JkMount /examples/*  ajp13
>>> >>>>> JkMount /examples/servlet/*  ajp13
>>> >>>>> JkMount /examples/CompressionTest  ajp13
>>> >>>>> JkMount /examples/*.jsp  ajp13
>>> >>>>> JkMount /examples/servletToJsp  ajp13
>>> >>>>> JkMount /examples/SendMailServlet  ajp13
>>> >>>>> </VirtualHost>
>>> >>>>>
>>> >>>>> ####################### server.xml
>>> >>>>> ######################################
>>> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>>> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>>> >>>>> unpackWARs="true" autoDeploy="true">
>>> >>>>> <Context path="/examples" docBase="examples" debug="0"
>>> >>>>> reloadable="true" crossContext="true">
>>> >>>>> <Context path="" docBase="ROOT" debug="0"/>
>>> >>>>> </Host>
>>> >>>>> </Engine>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>
>>> >>>>> 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
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> 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
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > 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
>>> >
>>> >
>>>
>>>
>>>
>>> -- 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
>>
>>
>
>
>



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


Re: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
I'm running Tomcat 4.1 and Apache 2 (Solaris).

My httpd.conf has no global ServerName defined.  It has a wildcard for 
NameVirtualHost:

NameVirtualHost *

My mod_jk.conf files look like this:

<VirtualHost *>
    ServerName host.domain.com
    DocumentRoot /usr/local/tomcat/webapps/host
    # Static files
    Alias /myApp "/usr/local/tomcat/webapps/myApp"
    <Directory "/usr/local/tomcat/webapps/myApp">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp
    </Directory>
    <Location "/myApp/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>
    <Location "/myApp/META-INF/*">
        AllowOverride None
        deny from all
    </Location>
    JkMount /myApp/*.do  ajp13
    JkMount /myApp/*.jsp  ajp13
</VirtualHost>

I tweak the JkMount (adding *.do for Struts, for example), so I don't use 
the output of the ApacheConfig classes directly, but I do use mod_jk.conf 
as much as I can, with as little modification as I can.  Right now, there 
are 11 VirtualHost containers in my mod_jk.conf, each one very similar to 
the one shown above, the only difference being the different values for 
"host.domain.com" and the different webapp roots.

I have some Tomcat 3 servers that do pretty much the same thing, but with 
mod_jserv...there are 22 virtual hosts there.

John

On Mon, 12 May 2003 10:36:54 -0300, Gustavo Lima <li...@opendf.com.br> 
wrote:

> Hi John,
>
> Maybe you have answered this question a thousand times but I?m not able 
> to
> find on list archives. How are you using these 10-12 virtual hosts 
> exactly?
>
> Thank?s for your help.
>
> Gustavo
> ----- Original Message ----- From: "John Turner" <tomcat- 
> user@johnturner.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, May 12, 2003 9:22 AM
> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
>>
>> Well, I think there is something else going on, most likely with your
>> Apache configuration.
>>
>> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
> auto-generation,
>> and 10-12 virtual hosts, and it works like a champ.
>>
>> John
>>
>> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman <b....@attbi.com>
>> wrote:
>>
>> > I think the second problem (having to manually define all of your
>> > contexts)
>> > could be solved if the <DefaultContext> would accept a <Listener> 
>> inside
>> > it - which is allowed according to the documentation, but I never got 
>> it
>> > working and ultimately decided that auto-deploying applications and
>> > having
>> > them linked through to Apache wasn't what I was after...  If someone
> else
>> > has a suggestion to make a Listener work within a DefaultContext, I'd
>> > love
>> > to hear the solution!
>> >
>> > Thanks,
>> > Brian
>> >
>> > -----Original Message-----
>> > From: Qing Xie [mailto:xie@ecopiabio.com]
>> > Sent: Friday, May 09, 2003 2:28 PM
>> > To: Tomcat Users List
>> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>> >
>> >
>> > Hi Brian,
>> >
>> > This did remove the <VirtualHost> tag in mod_jk.conf and solved the
>> > problem, but it caused another problem which is that I have to define 
>> a
>> > context for each application and place the listener there, otherwise,
>> > the JKMounts are not generated.
>> >
>> > I'm glad I have this option because at least, I don't have to modify
>> > mod_jk.conf every time I restart tomcat.
>> >
>> > Thank you very much :-)
>> >
>> > Qing
>> >
>> > Brian Briggman wrote:
>> >
>> >> Another option may be to remove your Listener in server.xml from 
>> right
>> > under
>> >> the <Host> (this is why you're getting a virtual host in mod_jk.conf) 
>> ,
>> >> and
>> >> instead place a Listener under each <Context> which will cause all of
>> >> the
>> >> same JKMounts to get generated in mod_jk.conf, just not nested within 
>> a
>> >> virtual host.
>> >>
>> >> Brian
>> >>
>> >> -----Original Message-----
>> >> From: John Turner [mailto:tomcat-user@johnturner.com]
>> >> Sent: Friday, May 09, 2003 11:57 AM
>> >> To: Tomcat Users List
>> >> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>> >>
>> >>
>> >>
>> >> I would try disabling Apache's global ServerName, and making sure you
>> >> have
>> >> this in httpd.conf:
>> >>
>> >> NameVirtualHost *
>> >>
>> >> John
>> >>
>> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> 
>> wrote:
>> >>
>> >>
>> >>
>> >>> Hi John,
>> >>>
>> >>> Thanks so much for helping me again.
>> >>>
>> >>> I've tried to change my global Apache ServerName to something else,
>> >>> such
>> >>> as "localhost", "some.host.com"(which doesn't exist), or not define 
>> it
>> >>> at
>> >>> all, but still, I got the same result.
>> >>>
>> >>> Qing
>> >>>
>> >>> John Turner wrote:
>> >>>
>> >>>
>> >>>
>> >>>> You have to delete the VirtualHost container from mod_jk.conf 
>> because
>> >>>> you already have that hostname hardcoded in your httpd.conf.
>> >>>>
>> >>>> You want your global Apache ServerName to be something OTHER than 
>> any
>> >>>> of
>> >>>> your VirtualHost ServerNames....it shouldn't be the same.
>> >>>>
>> >>>> John
>> >>>>
>> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com>
>> >>>> wrote:
>> >>>>
>> >>>>
>> >>>>
>> >>>>> Hi everyone,
>> >>>>>
>> >>>>> I posted this question a few days ago but didn't get any answers. 
>> I
>> >>>>> hope somebody can help me this time because I really couldn't
>> >>>>> understand what I didn't wrong.
>> >>>>>
>> >>>>> Basically, I get 404-not found error when I tried to access
>> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I
>> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, 
>> the
>> >>>>> above link works fine. Looks like I have problems with my virtual
>> >>>>> host
>> >>>>> config, so JKMount has to be globle in order to work. I'm using
>> >>>>> apache
>> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>> >>>>>
>> >>>>> I'm attaching main parts of my configration files here. Any inputs
>> >>>>> are
>> >>>>> highly appreciated.  Thanks very much!
>> >>>>>
>> >>>>> Qing
>> >>>>>
>> >>>>> ####################### httpd.conf
>> >>>>> ######################################
>> >>>>> ServerName my.host.com:80
>> >>>>> UseCanonicalName Off
>> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>> >>>>>
>> >>>>>
>> >>>>> ####################### mod_jk.conf
>> >>>>> ######################################
>> >>>>> <IfModule !mod_jk.c>
>> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>> >>>>> </IfModule>
>> >>>>>
>> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>> >>>>>
>> >>>>> JkLogLevel info
>> >>>>>
>> >>>>> <VirtualHost my.host.com>
>> >>>>> ServerName my.host.com
>> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
>> >>>>> Options Indexes FollowSymLinks
>> >>>>> DirectoryIndex index.html index.htm index.jsp
>> >>>>> </Directory>
>> >>>>> <Location "/examples/WEB-INF/*">
>> >>>>> AllowOverride None
>> >>>>> deny from all
>> >>>>> </Location>
>> >>>>> <Location "/examples/META-INF/*">
>> >>>>> AllowOverride None
>> >>>>> deny from all
>> >>>>> </Location>
>> >>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>> >>>>> JkMount /examples/snoop  ajp13
>> >>>>> JkMount /examples/*  ajp13
>> >>>>> JkMount /examples/servlet/*  ajp13
>> >>>>> JkMount /examples/CompressionTest  ajp13
>> >>>>> JkMount /examples/*.jsp  ajp13
>> >>>>> JkMount /examples/servletToJsp  ajp13
>> >>>>> JkMount /examples/SendMailServlet  ajp13
>> >>>>> </VirtualHost>
>> >>>>>
>> >>>>> ####################### server.xml
>> >>>>> ######################################
>> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>> >>>>> unpackWARs="true" autoDeploy="true">
>> >>>>> <Context path="/examples" docBase="examples" debug="0"
>> >>>>> reloadable="true" crossContext="true">
>> >>>>> <Context path="" docBase="ROOT" debug="0"/>
>> >>>>> </Host>
>> >>>>> </Engine>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>>
>>>>>> ---------------------------------------------------------------------
>> >>>>> 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
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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
>> >
>> >
>>
>>
>>
>> -- 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
>
>



-- 
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


Re: Why do I have to delete tag in mod_jk.conf

Posted by Gustavo Lima <li...@opendf.com.br>.
        Hi John,

Maybe you have answered this question a thousand times but I?m not able to
find on list archives. How are you using these 10-12 virtual hosts exactly?

Thank?s for your help.

Gustavo
----- Original Message ----- 
From: "John Turner" <to...@johnturner.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, May 12, 2003 9:22 AM
Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf


>
> Well, I think there is something else going on, most likely with your
> Apache configuration.
>
> On my 4.1.x server, I'm using mod_jk with the ApacheConfig
auto-generation,
> and 10-12 virtual hosts, and it works like a champ.
>
> John
>
> On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman <b....@attbi.com>
> wrote:
>
> > I think the second problem (having to manually define all of your
> > contexts)
> > could be solved if the <DefaultContext> would accept a <Listener> inside
> > it - which is allowed according to the documentation, but I never got it
> > working and ultimately decided that auto-deploying applications and
> > having
> > them linked through to Apache wasn't what I was after...  If someone
else
> > has a suggestion to make a Listener work within a DefaultContext, I'd
> > love
> > to hear the solution!
> >
> > Thanks,
> > Brian
> >
> > -----Original Message-----
> > From: Qing Xie [mailto:xie@ecopiabio.com]
> > Sent: Friday, May 09, 2003 2:28 PM
> > To: Tomcat Users List
> > Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >
> >
> > Hi Brian,
> >
> > This did remove the <VirtualHost> tag in mod_jk.conf and solved the
> > problem, but it caused another problem which is that I have to define a
> > context for each application and place the listener there, otherwise,
> > the JKMounts are not generated.
> >
> > I'm glad I have this option because at least, I don't have to modify
> > mod_jk.conf every time I restart tomcat.
> >
> > Thank you very much :-)
> >
> > Qing
> >
> > Brian Briggman wrote:
> >
> >> Another option may be to remove your Listener in server.xml from right
> > under
> >> the <Host> (this is why you're getting a virtual host in mod_jk.conf),
> >> and
> >> instead place a Listener under each <Context> which will cause all of
> >> the
> >> same JKMounts to get generated in mod_jk.conf, just not nested within a
> >> virtual host.
> >>
> >> Brian
> >>
> >> -----Original Message-----
> >> From: John Turner [mailto:tomcat-user@johnturner.com]
> >> Sent: Friday, May 09, 2003 11:57 AM
> >> To: Tomcat Users List
> >> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
> >>
> >>
> >>
> >> I would try disabling Apache's global ServerName, and making sure you
> >> have
> >> this in httpd.conf:
> >>
> >> NameVirtualHost *
> >>
> >> John
> >>
> >> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
> >>
> >>
> >>
> >>> Hi John,
> >>>
> >>> Thanks so much for helping me again.
> >>>
> >>> I've tried to change my global Apache ServerName to something else,
> >>> such
> >>> as "localhost", "some.host.com"(which doesn't exist), or not define it
> >>> at
> >>> all, but still, I got the same result.
> >>>
> >>> Qing
> >>>
> >>> John Turner wrote:
> >>>
> >>>
> >>>
> >>>> You have to delete the VirtualHost container from mod_jk.conf because
> >>>> you already have that hostname hardcoded in your httpd.conf.
> >>>>
> >>>> You want your global Apache ServerName to be something OTHER than any
> >>>> of
> >>>> your VirtualHost ServerNames....it shouldn't be the same.
> >>>>
> >>>> John
> >>>>
> >>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com>
> >>>> wrote:
> >>>>
> >>>>
> >>>>
> >>>>> Hi everyone,
> >>>>>
> >>>>> I posted this question a few days ago but didn't get any answers. I
> >>>>> hope somebody can help me this time because I really couldn't
> >>>>> understand what I didn't wrong.
> >>>>>
> >>>>> Basically, I get 404-not found error when I tried to access
> >>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I
> >>>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, the
> >>>>> above link works fine. Looks like I have problems with my virtual
> >>>>> host
> >>>>> config, so JKMount has to be globle in order to work. I'm using
> >>>>> apache
> >>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
> >>>>>
> >>>>> I'm attaching main parts of my configration files here. Any inputs
> >>>>> are
> >>>>> highly appreciated.  Thanks very much!
> >>>>>
> >>>>> Qing
> >>>>>
> >>>>> ####################### httpd.conf
> >>>>> ######################################
> >>>>> ServerName my.host.com:80
> >>>>> UseCanonicalName Off
> >>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
> >>>>>
> >>>>>
> >>>>> ####################### mod_jk.conf
> >>>>> ######################################
> >>>>> <IfModule !mod_jk.c>
> >>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
> >>>>> </IfModule>
> >>>>>
> >>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
> >>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
> >>>>>
> >>>>> JkLogLevel info
> >>>>>
> >>>>> <VirtualHost my.host.com>
> >>>>> ServerName my.host.com
> >>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
> >>>>> <Directory "/usr/java/tomcat/webapps/examples">
> >>>>> Options Indexes FollowSymLinks
> >>>>> DirectoryIndex index.html index.htm index.jsp
> >>>>> </Directory>
> >>>>> <Location "/examples/WEB-INF/*">
> >>>>> AllowOverride None
> >>>>> deny from all
> >>>>> </Location>
> >>>>> <Location "/examples/META-INF/*">
> >>>>> AllowOverride None
> >>>>> deny from all
> >>>>> </Location>
> >>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
> >>>>> JkMount /examples/snoop  ajp13
> >>>>> JkMount /examples/*  ajp13
> >>>>> JkMount /examples/servlet/*  ajp13
> >>>>> JkMount /examples/CompressionTest  ajp13
> >>>>> JkMount /examples/*.jsp  ajp13
> >>>>> JkMount /examples/servletToJsp  ajp13
> >>>>> JkMount /examples/SendMailServlet  ajp13
> >>>>> </VirtualHost>
> >>>>>
> >>>>> ####################### server.xml
> >>>>> ######################################
> >>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
> >>>>> <Host name="my.host.com" debug="0" appBase="webapps"
> >>>>> unpackWARs="true" autoDeploy="true">
> >>>>> <Context path="/examples" docBase="examples" debug="0"
> >>>>> reloadable="true" crossContext="true">
> >>>>> <Context path="" docBase="ROOT" debug="0"/>
> >>>>> </Host>
> >>>>> </Engine>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
>
>>>>> ---------------------------------------------------------------------
> >>>>> 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
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> 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
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
>
> -- 
> 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: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
Well, I think there is something else going on, most likely with your 
Apache configuration.

On my 4.1.x server, I'm using mod_jk with the ApacheConfig auto-generation, 
and 10-12 virtual hosts, and it works like a champ.

John

On Fri, 9 May 2003 14:40:27 -0500, Brian Briggman <b....@attbi.com> 
wrote:

> I think the second problem (having to manually define all of your 
> contexts)
> could be solved if the <DefaultContext> would accept a <Listener> inside
> it - which is allowed according to the documentation, but I never got it
> working and ultimately decided that auto-deploying applications and 
> having
> them linked through to Apache wasn't what I was after...  If someone else
> has a suggestion to make a Listener work within a DefaultContext, I'd 
> love
> to hear the solution!
>
> Thanks,
> Brian
>
> -----Original Message-----
> From: Qing Xie [mailto:xie@ecopiabio.com]
> Sent: Friday, May 09, 2003 2:28 PM
> To: Tomcat Users List
> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
> Hi Brian,
>
> This did remove the <VirtualHost> tag in mod_jk.conf and solved the
> problem, but it caused another problem which is that I have to define a
> context for each application and place the listener there, otherwise,
> the JKMounts are not generated.
>
> I'm glad I have this option because at least, I don't have to modify
> mod_jk.conf every time I restart tomcat.
>
> Thank you very much :-)
>
> Qing
>
> Brian Briggman wrote:
>
>> Another option may be to remove your Listener in server.xml from right
> under
>> the <Host> (this is why you're getting a virtual host in mod_jk.conf), 
>> and
>> instead place a Listener under each <Context> which will cause all of 
>> the
>> same JKMounts to get generated in mod_jk.conf, just not nested within a
>> virtual host.
>>
>> Brian
>>
>> -----Original Message-----
>> From: John Turner [mailto:tomcat-user@johnturner.com]
>> Sent: Friday, May 09, 2003 11:57 AM
>> To: Tomcat Users List
>> Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>>
>>
>>
>> I would try disabling Apache's global ServerName, and making sure you 
>> have
>> this in httpd.conf:
>>
>> NameVirtualHost *
>>
>> John
>>
>> On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>
>>
>>
>>> Hi John,
>>>
>>> Thanks so much for helping me again.
>>>
>>> I've tried to change my global Apache ServerName to something else, 
>>> such
>>> as "localhost", "some.host.com"(which doesn't exist), or not define it 
>>> at
>>> all, but still, I got the same result.
>>>
>>> Qing
>>>
>>> John Turner wrote:
>>>
>>>
>>>
>>>> You have to delete the VirtualHost container from mod_jk.conf because
>>>> you already have that hostname hardcoded in your httpd.conf.
>>>>
>>>> You want your global Apache ServerName to be something OTHER than any 
>>>> of
>>>> your VirtualHost ServerNames....it shouldn't be the same.
>>>>
>>>> John
>>>>
>>>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> 
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> Hi everyone,
>>>>>
>>>>> I posted this question a few days ago but didn't get any answers. I
>>>>> hope somebody can help me this time because I really couldn't
>>>>> understand what I didn't wrong.
>>>>>
>>>>> Basically, I get 404-not found error when I tried to access
>>>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I
>>>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, the
>>>>> above link works fine. Looks like I have problems with my virtual 
>>>>> host
>>>>> config, so JKMount has to be globle in order to work. I'm using 
>>>>> apache
>>>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>>>>
>>>>> I'm attaching main parts of my configration files here. Any inputs 
>>>>> are
>>>>> highly appreciated.  Thanks very much!
>>>>>
>>>>> Qing
>>>>>
>>>>> ####################### httpd.conf
>>>>> ######################################
>>>>> ServerName my.host.com:80
>>>>> UseCanonicalName Off
>>>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>>>
>>>>>
>>>>> ####################### mod_jk.conf
>>>>> ######################################
>>>>> <IfModule !mod_jk.c>
>>>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>>>>> </IfModule>
>>>>>
>>>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>>>
>>>>> JkLogLevel info
>>>>>
>>>>> <VirtualHost my.host.com>
>>>>> ServerName my.host.com
>>>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>>>>> <Directory "/usr/java/tomcat/webapps/examples">
>>>>> Options Indexes FollowSymLinks
>>>>> DirectoryIndex index.html index.htm index.jsp
>>>>> </Directory>
>>>>> <Location "/examples/WEB-INF/*">
>>>>> AllowOverride None
>>>>> deny from all
>>>>> </Location>
>>>>> <Location "/examples/META-INF/*">
>>>>> AllowOverride None
>>>>> deny from all
>>>>> </Location>
>>>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>>>> JkMount /examples/snoop  ajp13
>>>>> JkMount /examples/*  ajp13
>>>>> JkMount /examples/servlet/*  ajp13
>>>>> JkMount /examples/CompressionTest  ajp13
>>>>> JkMount /examples/*.jsp  ajp13
>>>>> JkMount /examples/servletToJsp  ajp13
>>>>> JkMount /examples/SendMailServlet  ajp13
>>>>> </VirtualHost>
>>>>>
>>>>> ####################### server.xml
>>>>> ######################################
>>>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>>>>> <Host name="my.host.com" debug="0" appBase="webapps"
>>>>> unpackWARs="true" autoDeploy="true">
>>>>> <Context path="/examples" docBase="examples" debug="0"
>>>>> reloadable="true" crossContext="true">
>>>>> <Context path="" docBase="ROOT" debug="0"/>
>>>>> </Host>
>>>>> </Engine>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>



-- 
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


RE: Why do I have to delete tag in mod_jk.conf

Posted by Brian Briggman <b....@attbi.com>.
I think the second problem (having to manually define all of your contexts)
could be solved if the <DefaultContext> would accept a <Listener> inside
it - which is allowed according to the documentation, but I never got it
working and ultimately decided that auto-deploying applications and having
them linked through to Apache wasn't what I was after...  If someone else
has a suggestion to make a Listener work within a DefaultContext, I'd love
to hear the solution!

Thanks,
Brian

-----Original Message-----
From: Qing Xie [mailto:xie@ecopiabio.com]
Sent: Friday, May 09, 2003 2:28 PM
To: Tomcat Users List
Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf


Hi Brian,

This did remove the <VirtualHost> tag in mod_jk.conf and solved the
problem, but it caused another problem which is that I have to define a
context for each application and place the listener there, otherwise,
the JKMounts are not generated.

I'm glad I have this option because at least, I don't have to modify
mod_jk.conf every time I restart tomcat.

Thank you very much :-)

Qing

Brian Briggman wrote:

>Another option may be to remove your Listener in server.xml from right
under
>the <Host> (this is why you're getting a virtual host in mod_jk.conf), and
>instead place a Listener under each <Context> which will cause all of the
>same JKMounts to get generated in mod_jk.conf, just not nested within a
>virtual host.
>
>Brian
>
>-----Original Message-----
>From: John Turner [mailto:tomcat-user@johnturner.com]
>Sent: Friday, May 09, 2003 11:57 AM
>To: Tomcat Users List
>Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
>
>I would try disabling Apache's global ServerName, and making sure you have
>this in httpd.conf:
>
>NameVirtualHost *
>
>John
>
>On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>
>
>
>>Hi John,
>>
>>Thanks so much for helping me again.
>>
>>I've tried to change my global Apache ServerName to something else, such
>>as "localhost", "some.host.com"(which doesn't exist), or not define it at
>>all, but still, I got the same result.
>>
>>Qing
>>
>>John Turner wrote:
>>
>>
>>
>>>You have to delete the VirtualHost container from mod_jk.conf because
>>>you already have that hostname hardcoded in your httpd.conf.
>>>
>>>You want your global Apache ServerName to be something OTHER than any of
>>>your VirtualHost ServerNames....it shouldn't be the same.
>>>
>>>John
>>>
>>>On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>>
>>>
>>>
>>>>Hi everyone,
>>>>
>>>>I posted this question a few days ago but didn't get any answers. I
>>>>hope somebody can help me this time because I really couldn't
>>>>understand what I didn't wrong.
>>>>
>>>>Basically, I get 404-not found error when I tried to access
>>>>http://my.host.com/examples/servlet/RequestInfoExampless, but if I
>>>>delete <VirtualHost> tag in mod_jk.conf file and restart apache, the
>>>>above link works fine. Looks like I have problems with my virtual host
>>>>config, so JKMount has to be globle in order to work. I'm using apache
>>>>2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>>>
>>>>I'm attaching main parts of my configration files here. Any inputs are
>>>>highly appreciated.  Thanks very much!
>>>>
>>>>Qing
>>>>
>>>>####################### httpd.conf
>>>>######################################
>>>>ServerName my.host.com:80
>>>>UseCanonicalName Off
>>>>Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>>
>>>>
>>>>####################### mod_jk.conf
>>>>######################################
>>>><IfModule !mod_jk.c>
>>>>LoadModule jk_module /opt/apache/modules/mod_jk.so
>>>></IfModule>
>>>>
>>>>JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>>>JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>>
>>>>JkLogLevel info
>>>>
>>>><VirtualHost my.host.com>
>>>>ServerName my.host.com
>>>>Alias /examples "/usr/java/tomcat/webapps/examples"
>>>><Directory "/usr/java/tomcat/webapps/examples">
>>>>Options Indexes FollowSymLinks
>>>>DirectoryIndex index.html index.htm index.jsp
>>>></Directory>
>>>><Location "/examples/WEB-INF/*">
>>>>AllowOverride None
>>>>deny from all
>>>></Location>
>>>><Location "/examples/META-INF/*">
>>>>AllowOverride None
>>>>deny from all
>>>></Location>
>>>>JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>>>JkMount /examples/snoop  ajp13
>>>>JkMount /examples/*  ajp13
>>>>JkMount /examples/servlet/*  ajp13
>>>>JkMount /examples/CompressionTest  ajp13
>>>>JkMount /examples/*.jsp  ajp13
>>>>JkMount /examples/servletToJsp  ajp13
>>>>JkMount /examples/SendMailServlet  ajp13
>>>></VirtualHost>
>>>>
>>>>####################### server.xml
>>>>######################################
>>>><Engine name="Standalone" defaultHost="localhost" debug="0">
>>>><Host name="my.host.com" debug="0" appBase="webapps"
>>>>unpackWARs="true" autoDeploy="true">
>>>><Context path="/examples" docBase="examples" debug="0"
>>>>reloadable="true" crossContext="true">
>>>><Context path="" docBase="ROOT" debug="0"/>
>>>></Host>
>>>></Engine>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>
>>
>>
>>
>
>
>
>--
>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
>
>
>
>
>



---------------------------------------------------------------------
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: Why do I have to delete tag in mod_jk.conf

Posted by Qing Xie <xi...@ecopiabio.com>.
Hi Brian,

This did remove the <VirtualHost> tag in mod_jk.conf and solved the 
problem, but it caused another problem which is that I have to define a 
context for each application and place the listener there, otherwise, 
the JKMounts are not generated.

I'm glad I have this option because at least, I don't have to modify 
mod_jk.conf every time I restart tomcat.

Thank you very much :-)

Qing

Brian Briggman wrote:

>Another option may be to remove your Listener in server.xml from right under
>the <Host> (this is why you're getting a virtual host in mod_jk.conf), and
>instead place a Listener under each <Context> which will cause all of the
>same JKMounts to get generated in mod_jk.conf, just not nested within a
>virtual host.
>
>Brian
>
>-----Original Message-----
>From: John Turner [mailto:tomcat-user@johnturner.com]
>Sent: Friday, May 09, 2003 11:57 AM
>To: Tomcat Users List
>Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf
>
>
>
>I would try disabling Apache's global ServerName, and making sure you have
>this in httpd.conf:
>
>NameVirtualHost *
>
>John
>
>On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>
>  
>
>>Hi John,
>>
>>Thanks so much for helping me again.
>>
>>I've tried to change my global Apache ServerName to something else, such
>>as "localhost", "some.host.com"(which doesn't exist), or not define it at
>>all, but still, I got the same result.
>>
>>Qing
>>
>>John Turner wrote:
>>
>>    
>>
>>>You have to delete the VirtualHost container from mod_jk.conf because
>>>you already have that hostname hardcoded in your httpd.conf.
>>>
>>>You want your global Apache ServerName to be something OTHER than any of
>>>your VirtualHost ServerNames....it shouldn't be the same.
>>>
>>>John
>>>
>>>On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>>
>>>      
>>>
>>>>Hi everyone,
>>>>
>>>>I posted this question a few days ago but didn't get any answers. I
>>>>hope somebody can help me this time because I really couldn't
>>>>understand what I didn't wrong.
>>>>
>>>>Basically, I get 404-not found error when I tried to access
>>>>http://my.host.com/examples/servlet/RequestInfoExampless, but if I
>>>>delete <VirtualHost> tag in mod_jk.conf file and restart apache, the
>>>>above link works fine. Looks like I have problems with my virtual host
>>>>config, so JKMount has to be globle in order to work. I'm using apache
>>>>2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>>>
>>>>I'm attaching main parts of my configration files here. Any inputs are
>>>>highly appreciated.  Thanks very much!
>>>>
>>>>Qing
>>>>
>>>>####################### httpd.conf
>>>>######################################
>>>>ServerName my.host.com:80
>>>>UseCanonicalName Off
>>>>Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>>
>>>>
>>>>####################### mod_jk.conf
>>>>######################################
>>>><IfModule !mod_jk.c>
>>>>LoadModule jk_module /opt/apache/modules/mod_jk.so
>>>></IfModule>
>>>>
>>>>JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>>>JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>>
>>>>JkLogLevel info
>>>>
>>>><VirtualHost my.host.com>
>>>>ServerName my.host.com
>>>>Alias /examples "/usr/java/tomcat/webapps/examples"
>>>><Directory "/usr/java/tomcat/webapps/examples">
>>>>Options Indexes FollowSymLinks
>>>>DirectoryIndex index.html index.htm index.jsp
>>>></Directory>
>>>><Location "/examples/WEB-INF/*">
>>>>AllowOverride None
>>>>deny from all
>>>></Location>
>>>><Location "/examples/META-INF/*">
>>>>AllowOverride None
>>>>deny from all
>>>></Location>
>>>>JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>>>JkMount /examples/snoop  ajp13
>>>>JkMount /examples/*  ajp13
>>>>JkMount /examples/servlet/*  ajp13
>>>>JkMount /examples/CompressionTest  ajp13
>>>>JkMount /examples/*.jsp  ajp13
>>>>JkMount /examples/servletToJsp  ajp13
>>>>JkMount /examples/SendMailServlet  ajp13
>>>></VirtualHost>
>>>>
>>>>####################### server.xml
>>>>######################################
>>>><Engine name="Standalone" defaultHost="localhost" debug="0">
>>>><Host name="my.host.com" debug="0" appBase="webapps"
>>>>unpackWARs="true" autoDeploy="true">
>>>><Context path="/examples" docBase="examples" debug="0"
>>>>reloadable="true" crossContext="true">
>>>><Context path="" docBase="ROOT" debug="0"/>
>>>></Host>
>>>></Engine>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>
>>
>>    
>>
>
>
>
>--
>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
>
>
>
>  
>



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


RE: Why do I have to delete tag in mod_jk.conf

Posted by Brian Briggman <b....@attbi.com>.
Another option may be to remove your Listener in server.xml from right under
the <Host> (this is why you're getting a virtual host in mod_jk.conf), and
instead place a Listener under each <Context> which will cause all of the
same JKMounts to get generated in mod_jk.conf, just not nested within a
virtual host.

Brian

-----Original Message-----
From: John Turner [mailto:tomcat-user@johnturner.com]
Sent: Friday, May 09, 2003 11:57 AM
To: Tomcat Users List
Subject: Re: Why do I have to delete <VirtualHost> tag in mod_jk.conf



I would try disabling Apache's global ServerName, and making sure you have
this in httpd.conf:

NameVirtualHost *

John

On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:

> Hi John,
>
> Thanks so much for helping me again.
>
> I've tried to change my global Apache ServerName to something else, such
> as "localhost", "some.host.com"(which doesn't exist), or not define it at
> all, but still, I got the same result.
>
> Qing
>
> John Turner wrote:
>
>>
>> You have to delete the VirtualHost container from mod_jk.conf because
>> you already have that hostname hardcoded in your httpd.conf.
>>
>> You want your global Apache ServerName to be something OTHER than any of
>> your VirtualHost ServerNames....it shouldn't be the same.
>>
>> John
>>
>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>
>>> Hi everyone,
>>>
>>> I posted this question a few days ago but didn't get any answers. I
>>> hope somebody can help me this time because I really couldn't
>>> understand what I didn't wrong.
>>>
>>> Basically, I get 404-not found error when I tried to access
>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I
>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, the
>>> above link works fine. Looks like I have problems with my virtual host
>>> config, so JKMount has to be globle in order to work. I'm using apache
>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>>
>>> I'm attaching main parts of my configration files here. Any inputs are
>>> highly appreciated.  Thanks very much!
>>>
>>> Qing
>>>
>>> ####################### httpd.conf
>>> ######################################
>>> ServerName my.host.com:80
>>> UseCanonicalName Off
>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>
>>>
>>> ####################### mod_jk.conf
>>> ######################################
>>> <IfModule !mod_jk.c>
>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>>> </IfModule>
>>>
>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>
>>> JkLogLevel info
>>>
>>> <VirtualHost my.host.com>
>>> ServerName my.host.com
>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>>> <Directory "/usr/java/tomcat/webapps/examples">
>>> Options Indexes FollowSymLinks
>>> DirectoryIndex index.html index.htm index.jsp
>>> </Directory>
>>> <Location "/examples/WEB-INF/*">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>> <Location "/examples/META-INF/*">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>> JkMount /examples/snoop  ajp13
>>> JkMount /examples/*  ajp13
>>> JkMount /examples/servlet/*  ajp13
>>> JkMount /examples/CompressionTest  ajp13
>>> JkMount /examples/*.jsp  ajp13
>>> JkMount /examples/servletToJsp  ajp13
>>> JkMount /examples/SendMailServlet  ajp13
>>> </VirtualHost>
>>>
>>> ####################### server.xml
>>> ######################################
>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>>> <Host name="my.host.com" debug="0" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true">
>>> <Context path="/examples" docBase="examples" debug="0"
>>> reloadable="true" crossContext="true">
>>> <Context path="" docBase="ROOT" debug="0"/>
>>> </Host>
>>> </Engine>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>



--
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: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
I would try disabling Apache's global ServerName, and making sure you have 
this in httpd.conf:

NameVirtualHost *

John

On Fri, 09 May 2003 12:25:08 -0400, Qing Xie <xi...@ecopiabio.com> wrote:

> Hi John,
>
> Thanks so much for helping me again.
>
> I've tried to change my global Apache ServerName to something else, such 
> as "localhost", "some.host.com"(which doesn't exist), or not define it at 
> all, but still, I got the same result.
>
> Qing
>
> John Turner wrote:
>
>>
>> You have to delete the VirtualHost container from mod_jk.conf because 
>> you already have that hostname hardcoded in your httpd.conf.
>>
>> You want your global Apache ServerName to be something OTHER than any of 
>> your VirtualHost ServerNames....it shouldn't be the same.
>>
>> John
>>
>> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>>
>>> Hi everyone,
>>>
>>> I posted this question a few days ago but didn't get any answers. I 
>>> hope somebody can help me this time because I really couldn't 
>>> understand what I didn't wrong.
>>>
>>> Basically, I get 404-not found error when I tried to access 
>>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I 
>>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, the 
>>> above link works fine. Looks like I have problems with my virtual host 
>>> config, so JKMount has to be globle in order to work. I'm using apache 
>>> 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>>
>>> I'm attaching main parts of my configration files here. Any inputs are 
>>> highly appreciated.  Thanks very much!
>>>
>>> Qing
>>>
>>> ####################### httpd.conf 
>>> ######################################
>>> ServerName my.host.com:80
>>> UseCanonicalName Off
>>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>>
>>>
>>> ####################### mod_jk.conf 
>>> ######################################
>>> <IfModule !mod_jk.c>
>>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>>> </IfModule>
>>>
>>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>>
>>> JkLogLevel info
>>>
>>> <VirtualHost my.host.com>
>>> ServerName my.host.com
>>> Alias /examples "/usr/java/tomcat/webapps/examples"
>>> <Directory "/usr/java/tomcat/webapps/examples">
>>> Options Indexes FollowSymLinks
>>> DirectoryIndex index.html index.htm index.jsp
>>> </Directory>
>>> <Location "/examples/WEB-INF/*">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>> <Location "/examples/META-INF/*">
>>> AllowOverride None
>>> deny from all
>>> </Location>
>>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>>> JkMount /examples/snoop  ajp13
>>> JkMount /examples/*  ajp13
>>> JkMount /examples/servlet/*  ajp13
>>> JkMount /examples/CompressionTest  ajp13
>>> JkMount /examples/*.jsp  ajp13
>>> JkMount /examples/servletToJsp  ajp13
>>> JkMount /examples/SendMailServlet  ajp13
>>> </VirtualHost>
>>>
>>> ####################### server.xml 
>>> ######################################
>>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>>> <Host name="my.host.com" debug="0" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true">
>>> <Context path="/examples" docBase="examples" debug="0"
>>> reloadable="true" crossContext="true">
>>> <Context path="" docBase="ROOT" debug="0"/>
>>> </Host>
>>> </Engine>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>



-- 
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


Re: Why do I have to delete tag in mod_jk.conf

Posted by Qing Xie <xi...@ecopiabio.com>.
Hi John,

Thanks so much for helping me again.

I've tried to change my global Apache ServerName to something else, such 
as "localhost", "some.host.com"(which doesn't exist), or not define it 
at all, but still, I got the same result.

Qing

John Turner wrote:

>
> You have to delete the VirtualHost container from mod_jk.conf because 
> you already have that hostname hardcoded in your httpd.conf.
>
> You want your global Apache ServerName to be something OTHER than any 
> of your VirtualHost ServerNames....it shouldn't be the same.
>
> John
>
> On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:
>
>> Hi everyone,
>>
>> I posted this question a few days ago but didn't get any answers. I 
>> hope somebody can help me this time because I really couldn't 
>> understand what I didn't wrong.
>>
>> Basically, I get 404-not found error when I tried to access 
>> http://my.host.com/examples/servlet/RequestInfoExampless, but if I 
>> delete <VirtualHost> tag in mod_jk.conf file and restart apache, the 
>> above link works fine. Looks like I have problems with my virtual 
>> host config, so JKMount has to be globle in order to work. I'm using 
>> apache 2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>>
>> I'm attaching main parts of my configration files here. Any inputs 
>> are highly appreciated.  Thanks very much!
>>
>> Qing
>>
>> ####################### httpd.conf 
>> ######################################
>> ServerName my.host.com:80
>> UseCanonicalName Off
>> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>>
>>
>> ####################### mod_jk.conf 
>> ######################################
>> <IfModule !mod_jk.c>
>> LoadModule jk_module /opt/apache/modules/mod_jk.so
>> </IfModule>
>>
>> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
>> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>>
>> JkLogLevel info
>>
>> <VirtualHost my.host.com>
>> ServerName my.host.com
>> Alias /examples "/usr/java/tomcat/webapps/examples"
>> <Directory "/usr/java/tomcat/webapps/examples">
>> Options Indexes FollowSymLinks
>> DirectoryIndex index.html index.htm index.jsp
>> </Directory>
>> <Location "/examples/WEB-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>> <Location "/examples/META-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>> JkMount /examples/jsp/security/protected/j_security_check  ajp13
>> JkMount /examples/snoop  ajp13
>> JkMount /examples/*  ajp13
>> JkMount /examples/servlet/*  ajp13
>> JkMount /examples/CompressionTest  ajp13
>> JkMount /examples/*.jsp  ajp13
>> JkMount /examples/servletToJsp  ajp13
>> JkMount /examples/SendMailServlet  ajp13
>> </VirtualHost>
>>
>> ####################### server.xml 
>> ######################################
>> <Engine name="Standalone" defaultHost="localhost" debug="0">
>> <Host name="my.host.com" debug="0" appBase="webapps"
>> unpackWARs="true" autoDeploy="true">
>> <Context path="/examples" docBase="examples" debug="0"
>> reloadable="true" crossContext="true">
>> <Context path="" docBase="ROOT" debug="0"/>
>> </Host>
>> </Engine>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Why do I have to delete tag in mod_jk.conf

Posted by John Turner <to...@johnturner.com>.
You have to delete the VirtualHost container from mod_jk.conf because you 
already have that hostname hardcoded in your httpd.conf.

You want your global Apache ServerName to be something OTHER than any of 
your VirtualHost ServerNames....it shouldn't be the same.

John

On Fri, 09 May 2003 12:04:15 -0400, Qing Xie <xi...@ecopiabio.com> wrote:

> Hi everyone,
>
> I posted this question a few days ago but didn't get any answers. I hope 
> somebody can help me this time because I really couldn't understand what 
> I didn't wrong.
>
> Basically, I get 404-not found error when I tried to access 
> http://my.host.com/examples/servlet/RequestInfoExampless, but if I delete 
> <VirtualHost> tag in mod_jk.conf file and restart apache, the above link 
> works fine. Looks like I have problems with my virtual host config, so 
> JKMount has to be globle in order to work. I'm using apache 2.0.44, 
> tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.
>
> I'm attaching main parts of my configration files here. Any inputs are 
> highly appreciated.  Thanks very much!
>
> Qing
>
> ####################### httpd.conf ######################################
> ServerName my.host.com:80
> UseCanonicalName Off
> Include /usr/java/tomcat/conf/auto/mod_jk.conf
>
>
> ####################### mod_jk.conf 
> ######################################
> <IfModule !mod_jk.c>
> LoadModule jk_module /opt/apache/modules/mod_jk.so
> </IfModule>
>
> JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
> JkLogFile "/usr/java/tomcat/logs/mod_jk.log"
>
> JkLogLevel info
>
> <VirtualHost my.host.com>
> ServerName my.host.com
> Alias /examples "/usr/java/tomcat/webapps/examples"
> <Directory "/usr/java/tomcat/webapps/examples">
> Options Indexes FollowSymLinks
> DirectoryIndex index.html index.htm index.jsp
> </Directory>
> <Location "/examples/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
> <Location "/examples/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
> JkMount /examples/jsp/security/protected/j_security_check  ajp13
> JkMount /examples/snoop  ajp13
> JkMount /examples/*  ajp13
> JkMount /examples/servlet/*  ajp13
> JkMount /examples/CompressionTest  ajp13
> JkMount /examples/*.jsp  ajp13
> JkMount /examples/servletToJsp  ajp13
> JkMount /examples/SendMailServlet  ajp13
> </VirtualHost>
>
> ####################### server.xml ######################################
> <Engine name="Standalone" defaultHost="localhost" debug="0">
> <Host name="my.host.com" debug="0" appBase="webapps"
> unpackWARs="true" autoDeploy="true">
> <Context path="/examples" docBase="examples" debug="0"
> reloadable="true" crossContext="true">
> <Context path="" docBase="ROOT" debug="0"/>
> </Host>
> </Engine>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Why do I have to delete tag in mod_jk.conf

Posted by Qing Xie <xi...@ecopiabio.com>.
Hi everyone,

I posted this question a few days ago but didn't get any answers. I hope 
somebody can help me this time because I really couldn't understand what 
I didn't wrong.

Basically, I get 404-not found error when I tried to access 
http://my.host.com/examples/servlet/RequestInfoExampless, but if I 
delete <VirtualHost> tag in mod_jk.conf file and restart apache, the 
above link works fine. Looks like I have problems with my virtual host 
config, so JKMount has to be globle in order to work. I'm using apache 
2.0.44, tomcat 4.1.18, mod_jk 2.0.43.so on Red Hat Linux7.3.

I'm attaching main parts of my configration files here. Any inputs are 
highly appreciated.  Thanks very much!

Qing

####################### httpd.conf ######################################
ServerName my.host.com:80
UseCanonicalName Off
Include /usr/java/tomcat/conf/auto/mod_jk.conf


####################### mod_jk.conf ######################################
<IfModule !mod_jk.c>
  LoadModule jk_module /opt/apache/modules/mod_jk.so
</IfModule>

JkWorkersFile "/usr/java/tomcat/conf/jk/workers.properties"
JkLogFile "/usr/java/tomcat/logs/mod_jk.log"

JkLogLevel info

<VirtualHost my.host.com>
    ServerName my.host.com
    Alias /examples "/usr/java/tomcat/webapps/examples"
   
    <Directory "/usr/java/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>
 
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>
   
    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>
   
    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/*  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13
</VirtualHost>

####################### server.xml ######################################
<Engine name="Standalone" defaultHost="localhost" debug="0">
  <Host name="my.host.com" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true">
      <Context path="/examples" docBase="examples" debug="0"
                 reloadable="true" crossContext="true">
     <Context path="" docBase="ROOT" debug="0"/>
   </Host>
</Engine>







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