You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Carl <da...@bspmail.com> on 2003/04/30 19:18:39 UTC

Re: Mod_jk blues SOLVED

I thought you had to define them in both.
I commented out my virutalhost in my httpd.conf and everything works great
:-)

I have a followup:
I noticed in the Host Container docs
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
that you can setup tomcat todo access logging but where or how do I define
ServerAdmin, DocumentRoot,  ErrorLog for a virtualhost like I did before in
my httpd.conf?
If it can't what do I need to take from the /conf/auto/mod_jk.conf and add
to my httpd.conf?

You've been referred to as a "Saint" on this list before, I second it.
Thanks John, for helping us novices.




>
> Sorry, now I'm confused....if you are including mod_jk.conf, and you have
> my.domain.com defined in server.xml, why are you manually defining
> my.domain.com in httpd.conf?
>
> There should only be one VirtualHost/ServerName definition in httpd.conf
> for each virtual host.  Whether that definition is added to httpd.conf by
> you or by including another file is something you have to decide, you
can't
> have it both ways.
>
> John
>
> On Tue, 29 Apr 2003 16:43:04 -0500, Dan Carl <da...@bspmail.com> wrote:
>
> > I have it at the bottom of my httpd.conf file.
> > Include /usr/local/tomcat/conf/auto/mod_jk.conf
> >
> > My mod_jk.conf is the same as yours.
> >
> >
> >>
> >> OK, where do you include the auto-generated mod_jk.conf file?  It
should
> >> look something like this:
> >>
> >> http://www.johnturner.com/howto/mod_jk_conf.html
> >>
> >> You can see the VirtualHost stanza for localhost and the URL mappings
> >> for
> >> /examples, /admin, and /manager in that file. Thus:
> >>
> >> http://localhost/examples
> >> http://localhost/admin
> >> http://localhost/manager
> > None of these work unless I specify port 8080
> >
> >> John
> >>
> >> On Tue, 29 Apr 2003 15:54:28 -0500, Dan Carl <da...@bspmail.com> wrote:
> >>
> >> > I am just trying to get the examples to work correctly before I setup
> >> my
> >> > own
> >> > context.
> >> >
> >> > httpd.conf
> >> >
> >> > # Example:
> >> > # LoadModule foo_module modules/mod_foo.so
> >> > #
> >> > LoadModule jk_module modules/mod_jk-2.0.43.so
> >> >
> >> > ServerName my.domain.com
> >> >
> >> > NameVirtualHost xxx.xxx.xxx.xxx
> >> >
> >> > #
> >> > # VirtualHost example:
> >> > # Almost any Apache directive may go into a VirtualHost container.
> >> > # The first VirtualHost section is used for requests without a known
> >> > # server name.
> >> > #
> >> > #<VirtualHost *>
> >> > #    ServerAdmin webmaster@dummy-host.example.com
> >> > #    DocumentRoot /www/docs/dummy-host.example.com
> >> > #    ServerName dummy-host.example.com
> >> > #    ErrorLog logs/dummy-host.example.com-error_log
> >> > #    CustomLog logs/dummy-host.example.com-access_log common
> >> > #</VirtualHost>
> >> > <Directory /domain/mydomain/htdocs>
> >> > AllowOverride AuthConfig
> >> > </Directory>
> >> > <VirtualHost xxx.xxx.xxx.xxx>
> >> > ServerAdmin webmaster@bspmail.com
> >> > DocumentRoot /domain/mydomain/htdocs
> >> > ServerName my.domain.com
> >> > ErrorLog /domain/mydomain/logs/error_log
> >> > CustomLog /domain/mydomain/logs/access_log combined
> >> > </VirtualHost>
> >> >
> >> >
> >> > Server.xml
> >> > <Server port="8005" shutdown="SHUTDOWN" debug="0">
> >> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> >> > modJk="/usr/local/apache2/modules/mod_jk.so" />
> >> >
> >> > <Host name="my.domain.com" debug="0" appBase="webapps"
> >> > unpackWARs="true" autoDeploy="true">
> >> >
> >> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
> >> > append="true" forwardAll="false" mo
> >> > dJk="/usr/local/apache2/modules/mod_jk.so" />
> >> >
> >> >
> >> >
> >> >>
> >> >> 404 is just a configuration error.  If it was 500 I would be
worried.
> >> >>
> >> >> Can you post the relevant portions of httpd.conf and server.xml, as
> > well
> >> > as
> >> >> a description of what you are trying to do, exactly (how it deviates
> >> >> from
> >> >> http://localhost/examples, for example)?
> >> >>
> >> >> John
> >> >>
> >> >> On Tue, 29 Apr 2003 11:36:31 -0500, Dan Carl <da...@bspmail.com>
> >> wrote:
> >> >>
> >> >> > I am currently running RH.2, Apache 1.3/Tomcat 4.0.4 w/Mod_webapp.
> >> >> > I followed John Turner's HOWTO Apache 2.0.44 / Tomcat 4.1.18 /
> >> mod_jk
> >> > for
> >> >> > RH Linux 7.2 (Thanks John, I don't know where you find the time)
> >> >> > Apache runs fine.
> >> >> > Tomcat runs fine.
> >> >> > Together via Mod_jk no dice.
> >> >> > I get a 404 error.
> >> >> > I've tried everything the last couple of days, that's the reason
> >> for
> >> >> my
> >> >> > message.
> >> >> > I check the logs nothing much there.
> >> >> > Found this in catalina.out
> >> >> > INFO: Jk running ID=0 time=24/68
> >> >> > config=/usr/local/tomcat/conf/jk2.properties
> >> >> > Is this correct?
> >> >> > Found this in Apache error_log
> >> >> > [Tue Apr 29 10:42:22 2003] [notice] Apache/2.0.44 (Unix)
> >> >> mod_ssl/2.0.44
> >> >> > OpenSSL/0.9.7a mod_jk/1.2.2 configured -- resuming normal
> >> operations
> >> >> > Does this indicate correct installation?
> >> >> > I checked my mod_jk.conf and it pretty much matches the one in
> >> John's
> >> >> > howto.
> >> >> > I complied my own mod_jk and had the same problem.
> >> >> > Does anyone out there have any suggestions? (please be
descriptive,
> >> >> I'm
> >> >> > not much of a Linux admin)
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> 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: Mod_jk blues SOLVED

Posted by John Turner <to...@johnturner.com>.
Rockin', I'm glad you got it resolved.

I think your access logging question is answered here:

http://jakarta.apache.org/tomcat/tomcat-4.1- 
doc/config/valve.html#Access%20Log%20Valve

John

On Wed, 30 Apr 2003 12:18:39 -0500, Dan Carl <da...@bspmail.com> wrote:

> I thought you had to define them in both.
> I commented out my virutalhost in my httpd.conf and everything works 
> great
> :-)
>
> I have a followup:
> I noticed in the Host Container docs
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
> that you can setup tomcat todo access logging but where or how do I 
> define
> ServerAdmin, DocumentRoot,  ErrorLog for a virtualhost like I did before 
> in
> my httpd.conf?
> If it can't what do I need to take from the /conf/auto/mod_jk.conf and 
> add
> to my httpd.conf?
>
> You've been referred to as a "Saint" on this list before, I second it.
> Thanks John, for helping us novices.
>
>
>
>
>>
>> Sorry, now I'm confused....if you are including mod_jk.conf, and you 
>> have
>> my.domain.com defined in server.xml, why are you manually defining
>> my.domain.com in httpd.conf?
>>
>> There should only be one VirtualHost/ServerName definition in httpd.conf
>> for each virtual host.  Whether that definition is added to httpd.conf 
>> by
>> you or by including another file is something you have to decide, you
> can't
>> have it both ways.
>>
>> John
>>
>> On Tue, 29 Apr 2003 16:43:04 -0500, Dan Carl <da...@bspmail.com> wrote:
>>
>> > I have it at the bottom of my httpd.conf file.
>> > Include /usr/local/tomcat/conf/auto/mod_jk.conf
>> >
>> > My mod_jk.conf is the same as yours.
>> >
>> >
>> >>
>> >> OK, where do you include the auto-generated mod_jk.conf file?  It
> should
>> >> look something like this:
>> >>
>> >> http://www.johnturner.com/howto/mod_jk_conf.html
>> >>
>> >> You can see the VirtualHost stanza for localhost and the URL mappings
>> >> for
>> >> /examples, /admin, and /manager in that file. Thus:
>> >>
>> >> http://localhost/examples
>> >> http://localhost/admin
>> >> http://localhost/manager
>> > None of these work unless I specify port 8080
>> >
>> >> John
>> >>
>> >> On Tue, 29 Apr 2003 15:54:28 -0500, Dan Carl <da...@bspmail.com> 
>> wrote:
>> >>
>> >> > I am just trying to get the examples to work correctly before I 
>> setup
>> >> my
>> >> > own
>> >> > context.
>> >> >
>> >> > httpd.conf
>> >> >
>> >> > # Example:
>> >> > # LoadModule foo_module modules/mod_foo.so
>> >> > #
>> >> > LoadModule jk_module modules/mod_jk-2.0.43.so
>> >> >
>> >> > ServerName my.domain.com
>> >> >
>> >> > NameVirtualHost xxx.xxx.xxx.xxx
>> >> >
>> >> > #
>> >> > # VirtualHost example:
>> >> > # Almost any Apache directive may go into a VirtualHost container.
>> >> > # The first VirtualHost section is used for requests without a 
>> known
>> >> > # server name.
>> >> > #
>> >> > #<VirtualHost *>
>> >> > #    ServerAdmin webmaster@dummy-host.example.com
>> >> > #    DocumentRoot /www/docs/dummy-host.example.com
>> >> > #    ServerName dummy-host.example.com
>> >> > #    ErrorLog logs/dummy-host.example.com-error_log
>> >> > #    CustomLog logs/dummy-host.example.com-access_log common
>> >> > #</VirtualHost>
>> >> > <Directory /domain/mydomain/htdocs>
>> >> > AllowOverride AuthConfig
>> >> > </Directory>
>> >> > <VirtualHost xxx.xxx.xxx.xxx>
>> >> > ServerAdmin webmaster@bspmail.com
>> >> > DocumentRoot /domain/mydomain/htdocs
>> >> > ServerName my.domain.com
>> >> > ErrorLog /domain/mydomain/logs/error_log
>> >> > CustomLog /domain/mydomain/logs/access_log combined
>> >> > </VirtualHost>
>> >> >
>> >> >
>> >> > Server.xml
>> >> > <Server port="8005" shutdown="SHUTDOWN" debug="0">
>> >> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>> >> > modJk="/usr/local/apache2/modules/mod_jk.so" />
>> >> >
>> >> > <Host name="my.domain.com" debug="0" appBase="webapps"
>> >> > unpackWARs="true" autoDeploy="true">
>> >> >
>> >> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>> >> > append="true" forwardAll="false" mo
>> >> > dJk="/usr/local/apache2/modules/mod_jk.so" />
>> >> >
>> >> >
>> >> >
>> >> >>
>> >> >> 404 is just a configuration error.  If it was 500 I would be
> worried.
>> >> >>
>> >> >> Can you post the relevant portions of httpd.conf and server.xml, 
>> as
>> > well
>> >> > as
>> >> >> a description of what you are trying to do, exactly (how it 
>> deviates
>> >> >> from
>> >> >> http://localhost/examples, for example)?
>> >> >>
>> >> >> John
>> >> >>
>> >> >> On Tue, 29 Apr 2003 11:36:31 -0500, Dan Carl <da...@bspmail.com>
>> >> wrote:
>> >> >>
>> >> >> > I am currently running RH.2, Apache 1.3/Tomcat 4.0.4 
>> w/Mod_webapp.
>> >> >> > I followed John Turner's HOWTO Apache 2.0.44 / Tomcat 4.1.18 /
>> >> mod_jk
>> >> > for
>> >> >> > RH Linux 7.2 (Thanks John, I don't know where you find the time)
>> >> >> > Apache runs fine.
>> >> >> > Tomcat runs fine.
>> >> >> > Together via Mod_jk no dice.
>> >> >> > I get a 404 error.
>> >> >> > I've tried everything the last couple of days, that's the reason
>> >> for
>> >> >> my
>> >> >> > message.
>> >> >> > I check the logs nothing much there.
>> >> >> > Found this in catalina.out
>> >> >> > INFO: Jk running ID=0 time=24/68
>> >> >> > config=/usr/local/tomcat/conf/jk2.properties
>> >> >> > Is this correct?
>> >> >> > Found this in Apache error_log
>> >> >> > [Tue Apr 29 10:42:22 2003] [notice] Apache/2.0.44 (Unix)
>> >> >> mod_ssl/2.0.44
>> >> >> > OpenSSL/0.9.7a mod_jk/1.2.2 configured -- resuming normal
>> >> operations
>> >> >> > Does this indicate correct installation?
>> >> >> > I checked my mod_jk.conf and it pretty much matches the one in
>> >> John's
>> >> >> > howto.
>> >> >> > I complied my own mod_jk and had the same problem.
>> >> >> > Does anyone out there have any suggestions? (please be
> descriptive,
>> >> >> I'm
>> >> >> > not much of a Linux admin)
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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