You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jbashir <jo...@ufnasoft.com> on 2006/09/02 15:32:15 UTC

[users@httpd] Integrating Apache and Tomcat via mod_jk

Is it possible to integrate Apache and Tomcat via mod_jk on remote computers.
I mean Apache is on one computer and Tomcat is installed on another
computers? Any idea??
-- 
View this message in context: http://www.nabble.com/Integrating-Apache-and-Tomcat-via-mod_jk-tf2207087.html#a6112723
Sent from the Apache HTTP Server - Users forum at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Integrating Apache and Tomcat via mod_jk

Posted by Serge Dubrouski <se...@gmail.com>.
I'm not really familiar with Windows version ob Tomcat and Apache. I
prefer UNIX/Linux. But...

On 9/2/06, jbashir <jo...@ufnasoft.com> wrote:
>
> A little explanation of the problem:
> I have the tomcat running on one computer with ip 192.168.0.130 and
> apache running on another computer with ip 192.168.0.21
>
> In the server.xml I have included these two lines:
> <Listener className="org.apache.jk.config.ApacheConfig"
> modJk="http://192.168.0.21/modules/mod_jk.dll" /> AND
> <Listener       className="org.apache.jk.config.ApacheConfig" append="true"
> forwardAll="false" modJk="http://192.168.0.21/modules/mod_jk.dll" />

That's just for generating workers.properties file for Apache. Besides
this you have some connectors configured there. It could AJP
connectors for mod_jk or HTTP connectors for mod_rewrite/mod_proxy.
It's up to you what kind of conector to use.

>
> This creates two new folder $TOMCAT_HOME\conf\auto\ AND
> $TOMCAT_HOME\conf\jk\.

There it should create workers.properties file if you have AJP
connector configured.

>
> The Apache is installed on 192.168.0.21. In the $APACHE_HOME\conf\httpd.conf
> file I have to include the line:
> Include http://192.168.0.130:8080/conf/auto/mod_jk.conf, to tell apache
> where mod_jk.conf is. When I start apache it gives the error:
>
> [error] Access to config file c:/program files/apache
>  group/apache/http://192.168.0.130:8080/conf/auto/mod_jk.conf denied: not a
> valid filename
> fopen: Permission denied

So it does not exist on your system. You should copy it from Tomcat
box. And remove IP addresses from file/path names.

> apache: could not open document config file c:/program files/apache
> group/apache/http://192.168.0.130:8080/conf/auto/mod_jk.conf

Do you actually have mod_jk compiled?

> If this line:
> Include http://192.168.0.130:8080/conf/auto/mod_jk.conf
> does not accept the url (it accepts only a directory), then what should I
> do?

You should create mod_jk.conf file. And put it into $APACHE_HOME/conf
directory. For the formar of that file check this

http://tomcat.apache.org/connectors-doc/howto/apache.html

Then replace
Include http://192.168.0.130:8080/conf/auto/mod_jk.conf

with

Include /conf/mod_jk.conf

Copy workers.properties files, and everything whall work fine then.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Integrating Apache and Tomcat via mod_jk

Posted by jbashir <jo...@ufnasoft.com>.
A little explanation of the problem:
I have the tomcat running on one computer with ip 192.168.0.130 and
apache running on another computer with ip 192.168.0.21

In the server.xml I have included these two lines:
<Listener className="org.apache.jk.config.ApacheConfig"
modJk="http://192.168.0.21/modules/mod_jk.dll" /> AND
<Listener 	className="org.apache.jk.config.ApacheConfig" append="true"
forwardAll="false" modJk="http://192.168.0.21/modules/mod_jk.dll" />

This creates two new folder $TOMCAT_HOME\conf\auto\ AND
$TOMCAT_HOME\conf\jk\.

The Apache is installed on 192.168.0.21. In the $APACHE_HOME\conf\httpd.conf
file I have to include the line:
Include http://192.168.0.130:8080/conf/auto/mod_jk.conf, to tell apache
where mod_jk.conf is. When I start apache it gives the error:

[error] Access to config file c:/program files/apache
 group/apache/http://192.168.0.130:8080/conf/auto/mod_jk.conf denied: not a
valid filename
fopen: Permission denied
apache: could not open document config file c:/program files/apache
group/apache/http://192.168.0.130:8080/conf/auto/mod_jk.conf

If this line:
Include http://192.168.0.130:8080/conf/auto/mod_jk.conf
does not accept the url (it accepts only a directory), then what should I
do?



Serge Dubrouski wrote:
> 
> I think yes. Why not? You can specify "address" on which Tomcat will
> be listeningg in the server.xml and then set the same port in the
> workers.properties.
> 
> On 9/2/06, jbashir <jo...@ufnasoft.com> wrote:
>>
>> Is it possible to integrate Apache and Tomcat via mod_jk on remote
>> computers.
>> I mean Apache is on one computer and Tomcat is installed on another
>> computers? Any idea??
>> --
>> View this message in context:
>> http://www.nabble.com/Integrating-Apache-and-Tomcat-via-mod_jk-tf2207087.html#a6112723
>> Sent from the Apache HTTP Server - Users forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Integrating-Apache-and-Tomcat-via-mod_jk-tf2207087.html#a6112937
Sent from the Apache HTTP Server - Users forum at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Integrating Apache and Tomcat via mod_jk

Posted by Serge Dubrouski <se...@gmail.com>.
I think yes. Why not? You can specify "address" on which Tomcat will
be listeningg in the server.xml and then set the same port in the
workers.properties.

On 9/2/06, jbashir <jo...@ufnasoft.com> wrote:
>
> Is it possible to integrate Apache and Tomcat via mod_jk on remote computers.
> I mean Apache is on one computer and Tomcat is installed on another
> computers? Any idea??
> --
> View this message in context: http://www.nabble.com/Integrating-Apache-and-Tomcat-via-mod_jk-tf2207087.html#a6112723
> Sent from the Apache HTTP Server - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org