You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kristian Duske <ml...@gmx.net> on 2002/02/23 20:11:08 UTC

Tomcat 4 and Apache

Hi everyone,

I'm sorry that I'm probably the 100th person to ask this, but I have
searched google groups and the archives of this mailing list, both of which
failed to help me setting up Tomcat 4.01 with Apache 1.3.23 on Windows.

I have tried to load both mod_jk.dll and mod_webapp.so in Apache. mod_jk
gives me the following error:
Syntax error on line 195 of c:/programme/wamp/apache/conf/httpd.conf:
Can't locate API module structure `mod_jk' in file
c:/programme/wamp/apache/modules/mod_jk.dll: (127) Die angegebene Prozedur
wurde nicht gefunden:

The last bit translates to "The specified procedure was not found". The
relevant lines in my httpd.conf are
LoadModule mod_jk modules/mod_jk.dll
AddModule mod_jk.c

I had more luck with mod_webapp, which loads properly using these lines:
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection conn      warp  localhost:8008

But when I add either (or both) of these lines
WebAppInfo /webapp-info
WebAppDeploy     examples conn  /examples

apache -t gives me the following error:
C:\Programme\Wamp\Apache>apache -t
Syntax error on line 256 of c:/programme/wamp/apache/conf/httpd.conf:
Invalid virtual host name

where in line 256 is either one (or the first of)
WebAppInfo /webapp-info
WebAppDeploy     examples conn  /examples

I have found out that other users had this problem when their ServerName
directive was commented out in their httpd.conf, and I have tried that
already, without luck.

Does anybody have an idea how to solve this problem?

Thank you very much
Kristian


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat 4 and Apache

Posted by Frank <fa...@netscape.net>.
I had the same problem

here is the relevant code for /etc/conf/httpd.conf

*** insert at the end of LoadModules
LoadModule webapp_module modules/mod_webapp.so

***** insert at end of AddModules
AddModule mod_webapp.c

**** add the virtual host www.testdomain.com where shown
# Virtual hosts


# Virtual host Default Virtual Host
<VirtualHost _default_:*>



   ServerName  _default_

  DirectoryIndex  index.php index.html index.htm index.shtml


   ServerSignature email











   LogLevel  warn
   HostNameLookups off




</VirtualHost>

#NameVirtualHost 127.0.0.1

<VirtualHost www.testdomain.com>
ServerName www.testdomain.com
ServerAdmin root@localhost
DocumentRoot "/var/www/html"

WebAppConnection testWarp warp www.testdomain.com:8008
WebAppDeploy examples testWarp /examples/
WebAppDeploy workout testWarp /workout/
</VirtualHost>

define a host in your Hosts file like
www.testdomain.com 192.168.1.200 Mendelsohn

Configured thusly,   you can access servlets from outside as 
http://Mendelsohn/workout/servlet/DBOopen for instance.  So if you have 
an Applet which calls a servlet, this will work fine (it's rally 
executing from outside)

A flaw in this arrangement is that from inside you need to do 
http://www.testdomain.com/workout/servlet/DBOpen  I think this is 
fixable, but haven't gotten to it yet.


I haven't seen a big performance increase from this, but you would need 
to implement this rather than tomcat standalone for security reasons I 
think.


Also you MUST start tomcat before apache.

ml.duske@gmx.net wrote:

> Hi everyone,
> 
> I'm sorry that I'm probably the 100th person to ask this, but I have
> searched google groups and the archives of this mailing list, both of which
> failed to help me setting up Tomcat 4.01 with Apache 1.3.23 on Windows.
> 
> I have tried to load both mod_jk.dll and mod_webapp.so in Apache. mod_jk
> gives me the following error:
> Syntax error on line 195 of c:/programme/wamp/apache/conf/httpd.conf:
> Can't locate API module structure `mod_jk' in file
> c:/programme/wamp/apache/modules/mod_jk.dll: (127) Die angegebene Prozedur
> wurde nicht gefunden:
> 
> The last bit translates to "The specified procedure was not found". The
> relevant lines in my httpd.conf are
> LoadModule mod_jk modules/mod_jk.dll
> AddModule mod_jk.c
> 
> I had more luck with mod_webapp, which loads properly using these lines:
> LoadModule webapp_module modules/mod_webapp.so
> AddModule mod_webapp.c
> WebAppConnection conn      warp  localhost:8008
> 
> But when I add either (or both) of these lines
> WebAppInfo /webapp-info
> WebAppDeploy     examples conn  /examples
> 
> apache -t gives me the following error:
> C:\Programme\Wamp\Apache>apache -t
> Syntax error on line 256 of c:/programme/wamp/apache/conf/httpd.conf:
> Invalid virtual host name
> 
> where in line 256 is either one (or the first of)
> WebAppInfo /webapp-info
> WebAppDeploy     examples conn  /examples
> 
> I have found out that other users had this problem when their ServerName
> directive was commented out in their httpd.conf, and I have tried that
> already, without luck.
> 
> Does anybody have an idea how to solve this problem?
> 
> Thank you very much
> Kristian
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Tomcat 4 and Apache

Posted by Kristian Duske <ml...@gmx.net>.
> You need to uncomment ServerName directive in httpd.conf and change the
> default server name there to your server's Fully Qualified Domain
> Name or IP
> address. The error you are seeing is because ServerName has not been
> changed.

I tried both the machine name, "localhost" and the ip adress, but none of
these worked. I have installed Tomcat on my linux box along with Apache now,
and it works fine there (however, I had to compile mod_webapp.so myself).
I'd still be interested to get it to run on my Windows box though in case I
have to use it on my laptop.

Thank you for your tip
Kristian


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat 4 and Apache

Posted by Pascal Chong <ch...@cymulacrum.net>.
You need to uncomment ServerName directive in httpd.conf and change the
default server name there to your server's Fully Qualified Domain Name or IP
address. The error you are seeing is because ServerName has not been
changed.

Regards,
Pascal Chong


----- Original Message -----
From: "Kristian Duske" <ml...@gmx.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>; <bi...@satx.rr.com>
Sent: Sunday, February 24, 2002 6:10 PM
Subject: RE: Tomcat 4 and Apache


> Hi Brian,
>
> > I think I see the problem.
> > you do NOT need the line:
> > AddModule mod_jk.c
>
> Thanks for your tip, but this didn't fix it for me. I'm still at a loss
> here.
>
> Regards
> Kristian
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Tomcat 4 and Apache

Posted by Kristian Duske <ml...@gmx.net>.
Hi Brian,

> I think I see the problem.
> you do NOT need the line:
> AddModule mod_jk.c

Thanks for your tip, but this didn't fix it for me. I'm still at a loss
here.

Regards
Kristian


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Tomcat 4 and Apache

Posted by Brian Adams <bi...@satx.rr.com>.
Hi Kristian,
I think I see the problem.
you do NOT need the line:
AddModule mod_jk.c


I have seen this error before and I am no connection geek but I thought this
line was not needed for mod_jk and I cchecked with my config and myne does
not have it either.

Goodluck,
brian

-----Original Message-----
From: Kristian Duske [mailto:ml.duske@gmx.net]
Sent: Saturday, February 23, 2002 1:11 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 4 and Apache


Hi everyone,

I'm sorry that I'm probably the 100th person to ask this, but I have
searched google groups and the archives of this mailing list, both of which
failed to help me setting up Tomcat 4.01 with Apache 1.3.23 on Windows.

I have tried to load both mod_jk.dll and mod_webapp.so in Apache. mod_jk
gives me the following error:
Syntax error on line 195 of c:/programme/wamp/apache/conf/httpd.conf:
Can't locate API module structure `mod_jk' in file
c:/programme/wamp/apache/modules/mod_jk.dll: (127) Die angegebene Prozedur
wurde nicht gefunden:

The last bit translates to "The specified procedure was not found". The
relevant lines in my httpd.conf are
LoadModule mod_jk modules/mod_jk.dll
AddModule mod_jk.c

I had more luck with mod_webapp, which loads properly using these lines:
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection conn      warp  localhost:8008

But when I add either (or both) of these lines
WebAppInfo /webapp-info
WebAppDeploy     examples conn  /examples

apache -t gives me the following error:
C:\Programme\Wamp\Apache>apache -t
Syntax error on line 256 of c:/programme/wamp/apache/conf/httpd.conf:
Invalid virtual host name

where in line 256 is either one (or the first of)
WebAppInfo /webapp-info
WebAppDeploy     examples conn  /examples

I have found out that other users had this problem when their ServerName
directive was commented out in their httpd.conf, and I have tried that
already, without luck.

Does anybody have an idea how to solve this problem?

Thank you very much
Kristian


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>