You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Mayes <cm...@cmayes.org> on 2006/11/16 04:39:55 UTC
Virtual Host hiding JkMount directives?
Hi, all.
I seem to be having a bit of trouble with virtual hosts and mod_jk.
JkMount directives in a VirtualHost are ignored:
<VirtualHost *>
ServerName censea.cmayes.org
JkMount /* ajp13
ErrorLog /var/log/apache2/censea_error_log
TransferLog /var/log/apache2/censea_access_log
DocumentRoot /usr/local/www/
DirectoryIndex index.jsp
</VirtualHost>
mod_jk log:
[Wed Nov 15 21:02:08 2006] [11224:0000] [debug] init_jk::mod_jk.c
(2355): Initialized shm:/var/log/apache2/memory.shm
[Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
[Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
build_worker_map::jk_worker.c (236): creating worker ajp13
If I move the directive outside of the VirtualHost block, it gets picked up:
JkMount /* ajp13
<VirtualHost *>
...
mod_jk log:
[Wed Nov 15 21:03:36 2006] [11576:0000] [debug] init_jk::mod_jk.c
(2355): Initialized shm:/var/log/apache2/memory.shm
[Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 1
[Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
uri_worker_map_add::jk_uri_worker_map.c (298): wildchar rule /*=ajp13
was added
[Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
build_worker_map::jk_worker.c (236): creating worker ajp13
Here's my tomcat server.xml:
<Server port="8005" shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector port="8080" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="censea.cmayes.org">
<Host name="censea.cmayes.org" appBase="nothing">
<Context path="" docBase="/usr/local/tomcat/censea/trawler.war"/>
<Logger className="org.apache.catalina.logger.FileLogger"/>
</Host>
</Engine>
</Service>
</Server>
I'm running Ubuntu Edgy Eft (6.10) with:
Apache Tomcat/5.5.15 (dropped in /usr/local/tomcat; not a distro package)
apache2 2.0.55-4ubuntu4
libapache2-mod-jk 1.2.18-1ubuntu1
Thanks,
-Chris
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Virtual Host hiding JkMount directives?
Posted by Chris Mayes <cm...@cmayes.org>.
Well, it's turned out that the log messages were misleading. I wiped
out my old Apache config and re-assembled it piece by piece. I haven't
re-added everything, but mod_jk now functions properly.
Thanks,
-Chris
Chris Mayes wrote:
> Sadly, no. The mapping isn't functional when it's in the
> VirtualHost. It works outside of the VH definition, but that's
> obviously not where I want it :-) I'll try to provide more details
> when I get home.
>
> Thanks,
>
> -Chris
>
> Rainer Jung wrote:
>> Hi,
>>
>> I tried to reproduce. It looks like the mapping actually works, but the
>> logger is not correctly initialized for the virtual server.
>>
>> Could you please confirm, that the mappings you enter to the virtual
>> servers work, and the problem is only the misleading log lines?
>>
>> Regards,
>>
>> Rainer
>>
>> Chris Mayes schrieb:
>>
>>> Hi, all.
>>>
>>> I seem to be having a bit of trouble with virtual hosts and mod_jk.
>>> JkMount directives in a VirtualHost are ignored:
>>>
>>> <VirtualHost *>
>>> ServerName censea.cmayes.org
>>> JkMount /* ajp13
>>>
>>> ErrorLog /var/log/apache2/censea_error_log
>>> TransferLog /var/log/apache2/censea_access_log
>>>
>>> DocumentRoot /usr/local/www/
>>> DirectoryIndex index.jsp
>>> </VirtualHost>
>>>
>>> mod_jk log:
>>>
>>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug] init_jk::mod_jk.c
>>> (2355): Initialized shm:/var/log/apache2/memory.shm
>>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
>>> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
>>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
>>> build_worker_map::jk_worker.c (236): creating worker ajp13
>>>
>>> If I move the directive outside of the VirtualHost block, it gets
>>> picked
>>> up:
>>>
>>> JkMount /* ajp13
>>> <VirtualHost *>
>>> ...
>>>
>>> mod_jk log:
>>>
>>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug] init_jk::mod_jk.c
>>> (2355): Initialized shm:/var/log/apache2/memory.shm
>>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>>> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 1
>>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>>> uri_worker_map_add::jk_uri_worker_map.c (298): wildchar rule /*=ajp13
>>> was added
>>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>>> build_worker_map::jk_worker.c (236): creating worker ajp13
>>>
>>> Here's my tomcat server.xml:
>>> <Server port="8005" shutdown="SHUTDOWN">
>>> <Service name="Catalina">
>>> <Connector port="8080" />
>>>
>>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>>> <Connector port="8009"
>>> enableLookups="false" redirectPort="8443"
>>> protocol="AJP/1.3" />
>>>
>>> <Engine name="Catalina" defaultHost="censea.cmayes.org">
>>>
>>> <Host name="censea.cmayes.org" appBase="nothing">
>>> <Context path=""
>>> docBase="/usr/local/tomcat/censea/trawler.war"/>
>>> <Logger className="org.apache.catalina.logger.FileLogger"/>
>>> </Host>
>>>
>>> </Engine>
>>> </Service>
>>> </Server>
>>>
>>>
>>> I'm running Ubuntu Edgy Eft (6.10) with:
>>> Apache Tomcat/5.5.15 (dropped in /usr/local/tomcat; not a distro
>>> package)
>>> apache2 2.0.55-4ubuntu4
>>> libapache2-mod-jk 1.2.18-1ubuntu1
>>>
>>> Thanks,
>>>
>>> -Chris
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Virtual Host hiding JkMount directives?
Posted by Chris Mayes <cm...@cmayes.org>.
Sadly, no. The mapping isn't functional when it's in the VirtualHost.
It works outside of the VH definition, but that's obviously not where I
want it :-) I'll try to provide more details when I get home.
Thanks,
-Chris
Rainer Jung wrote:
> Hi,
>
> I tried to reproduce. It looks like the mapping actually works, but the
> logger is not correctly initialized for the virtual server.
>
> Could you please confirm, that the mappings you enter to the virtual
> servers work, and the problem is only the misleading log lines?
>
> Regards,
>
> Rainer
>
> Chris Mayes schrieb:
>
>> Hi, all.
>>
>> I seem to be having a bit of trouble with virtual hosts and mod_jk.
>> JkMount directives in a VirtualHost are ignored:
>>
>> <VirtualHost *>
>> ServerName censea.cmayes.org
>> JkMount /* ajp13
>>
>> ErrorLog /var/log/apache2/censea_error_log
>> TransferLog /var/log/apache2/censea_access_log
>>
>> DocumentRoot /usr/local/www/
>> DirectoryIndex index.jsp
>> </VirtualHost>
>>
>> mod_jk log:
>>
>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug] init_jk::mod_jk.c
>> (2355): Initialized shm:/var/log/apache2/memory.shm
>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
>> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
>> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
>> build_worker_map::jk_worker.c (236): creating worker ajp13
>>
>> If I move the directive outside of the VirtualHost block, it gets picked
>> up:
>>
>> JkMount /* ajp13
>> <VirtualHost *>
>> ...
>>
>> mod_jk log:
>>
>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug] init_jk::mod_jk.c
>> (2355): Initialized shm:/var/log/apache2/memory.shm
>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 1
>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>> uri_worker_map_add::jk_uri_worker_map.c (298): wildchar rule /*=ajp13
>> was added
>> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
>> build_worker_map::jk_worker.c (236): creating worker ajp13
>>
>> Here's my tomcat server.xml:
>> <Server port="8005" shutdown="SHUTDOWN">
>> <Service name="Catalina">
>> <Connector port="8080" />
>>
>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>> <Connector port="8009"
>> enableLookups="false" redirectPort="8443"
>> protocol="AJP/1.3" />
>>
>> <Engine name="Catalina" defaultHost="censea.cmayes.org">
>>
>> <Host name="censea.cmayes.org" appBase="nothing">
>> <Context path="" docBase="/usr/local/tomcat/censea/trawler.war"/>
>> <Logger className="org.apache.catalina.logger.FileLogger"/>
>> </Host>
>>
>> </Engine>
>> </Service>
>> </Server>
>>
>>
>> I'm running Ubuntu Edgy Eft (6.10) with:
>> Apache Tomcat/5.5.15 (dropped in /usr/local/tomcat; not a distro package)
>> apache2 2.0.55-4ubuntu4
>> libapache2-mod-jk 1.2.18-1ubuntu1
>>
>> Thanks,
>>
>> -Chris
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Virtual Host hiding JkMount directives?
Posted by Rainer Jung <ra...@kippdata.de>.
Hi,
I tried to reproduce. It looks like the mapping actually works, but the
logger is not correctly initialized for the virtual server.
Could you please confirm, that the mappings you enter to the virtual
servers work, and the problem is only the misleading log lines?
Regards,
Rainer
Chris Mayes schrieb:
> Hi, all.
>
> I seem to be having a bit of trouble with virtual hosts and mod_jk.
> JkMount directives in a VirtualHost are ignored:
>
> <VirtualHost *>
> ServerName censea.cmayes.org
> JkMount /* ajp13
>
> ErrorLog /var/log/apache2/censea_error_log
> TransferLog /var/log/apache2/censea_access_log
>
> DocumentRoot /usr/local/www/
> DirectoryIndex index.jsp
> </VirtualHost>
>
> mod_jk log:
>
> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug] init_jk::mod_jk.c
> (2355): Initialized shm:/var/log/apache2/memory.shm
> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
> [Wed Nov 15 21:02:08 2006] [11224:0000] [debug]
> build_worker_map::jk_worker.c (236): creating worker ajp13
>
> If I move the directive outside of the VirtualHost block, it gets picked
> up:
>
> JkMount /* ajp13
> <VirtualHost *>
> ...
>
> mod_jk log:
>
> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug] init_jk::mod_jk.c
> (2355): Initialized shm:/var/log/apache2/memory.shm
> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
> uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 1
> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
> uri_worker_map_add::jk_uri_worker_map.c (298): wildchar rule /*=ajp13
> was added
> [Wed Nov 15 21:03:36 2006] [11576:0000] [debug]
> build_worker_map::jk_worker.c (236): creating worker ajp13
>
> Here's my tomcat server.xml:
> <Server port="8005" shutdown="SHUTDOWN">
> <Service name="Catalina">
> <Connector port="8080" />
>
> <!-- Define an AJP 1.3 Connector on port 8009 -->
> <Connector port="8009"
> enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
>
> <Engine name="Catalina" defaultHost="censea.cmayes.org">
>
> <Host name="censea.cmayes.org" appBase="nothing">
> <Context path="" docBase="/usr/local/tomcat/censea/trawler.war"/>
> <Logger className="org.apache.catalina.logger.FileLogger"/>
> </Host>
>
> </Engine>
> </Service>
> </Server>
>
>
> I'm running Ubuntu Edgy Eft (6.10) with:
> Apache Tomcat/5.5.15 (dropped in /usr/local/tomcat; not a distro package)
> apache2 2.0.55-4ubuntu4
> libapache2-mod-jk 1.2.18-1ubuntu1
>
> Thanks,
>
> -Chris
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org