You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by mike spisak <ms...@pb.net> on 2007/03/02 22:29:21 UTC

mod_jk 1.2.21, apxs, and apache 2.0.54

Hi All,

been trolling, lurking, searching, on this and other items all week......

long story short, i need the JkUnMount capability from mod_jk  - i have 
mod_jk 1.2.6 (I need a newer version).  so, here we go:
running: apache 2.0.54, tomcat 5 -
i downloaded and unzipped mod_jk 1.2.21 - tried to compile myself.. i 
have apxs, but not apxs2... so the compilation produced a mod_jk.so for 
apache-1.3 (which won't work for my apache2)..   so:

1- can anyone tell me how to work around the apxs / apxs2 thing?
2- i read somewhere that i can get apxs from apache2-devel package 
(can't seem to find this anywhere) - if I can't work around it, can I 
just get apxs2 and compile this??  can anyone point me to how/where?
3- any other ways to do this? 

...loosing hair as we speak - thanks in advance,
mike



---------------------------------------------------------------------
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: tomcat5 auto context detection

Posted by Mark Thomas <ma...@apache.org>.
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner


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


tomcat5 auto context detection

Posted by mike spisak <ms...@pb.net>.
Hi All,

I'm trying to get tomcat to auto-recognize that I have new java 
applications (e.g. a new WEB-INF) in a sub-directory for my virtual 
hosts..  I'd like to make it so that I don't have to edit my server.xml 
every time I add a new app within some domain/sub domain...   is this 
possible?

quickie background:
- Linux Fedora Core 4, apache 2.0.54, tomcat 5, mod_jk running nicely... 
- all my domains and sub-domains are in /var/www/vhosts/<domain>
    e.g. /var/www/vhosts/example1.com/htdocs/<java stuff>     (java 
stuff = jsp files, WEB-INF directory, etc)
    e.g. /var/www/vhosts/example2.com/htdocs/<java stuff>     (java 
stuff = jsp files, WEB-INF directory, etc)
    e.g. /var/www/vhosts/example2.com/sub-domain/cool/htdocs/<java 
stuff>     (java stuff = jsp files, WEB-INF directory, etc)
       (the sub domain example would be: http://cool.example2.com)
    ....and so on...

I'd like to be able to add a new domain or sub domain, simply drop my 
app (associated jsps and WEB-INF stuff) into the appropriate directory 
of the new domain or sub domain, restart tomcat and *poof* have it 
work.... 

so my server.xml snippet looks like this:

-- I tried having defaultHost = localhost..  didn't really work, when I 
tried sub-domains I got "no host matches server name"
-- My logic behind putting the "appBase" to vhosts, was so that tomcat 
could scan everything after that, and thus when it encounters a WEB-INF 
it would make it a context.. but not sure how that context would map to 
a specific domain...  (hence the "deployOnStartup" = true)
-- I added a context for example1.com which works..  but don't want to 
have to add one every time...

    <Engine name="PSA" defaultHost="example1.com" debug="0">
      <Host deployXML="true" name="example1.com" debug="0"
          appBase="/var/www/vhosts" unpackWARs="false" autoDeploy="true"
          liveDeploy="true" deployOnStartup="true">
            <!-- added a context, but don't want to.. -->
            <Context crossContext="false"
            reloadable="false" useNaming="true" debug="0" 
swallowOutput="false"
            privileged="true" displayName="my app"
            docBase="/var/www/vhosts/example1.com/htdocs" cookies="true"
            path="" cachingAllowed="true"/>
            <Realm className="org.apache.catalina.realm.MemoryRealm" 
debug="0" pathname="my-users/example1.com.xml" validate="true"/>
            <Alias>
        www.example1.com
            </Alias>
      </Host>
    </Engine>

...also, wondering about cooperation between apache and tomcat... 

thanks in advance,
Mike


---------------------------------------------------------------------
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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by mike spisak <ms...@pb.net>.
hi Chris,

thanks for all your information!   you've been helpful..  do I trust 
you??  ..hhmm..  :-)

anyway, my problem was solved by using the SetEnvIfNoCase directive.   
The main reason i needed an updated jk was for the jkUnMount 
exclusions..  another post on here pointed me to SetEnvIf - which 
allowed me the JK mount exclusions I needed..

So now I have tomcat serving servlets, jsps, etc.. and apache taking 
care of statics and php's..  awesome!

Also, FYI- I stumbled on this link--> 
http://wiki.dspace.org/index.php/ModJk  --which had some great ways to 
get mod_jk compiled.. in addition to the fast path, it talked about 
using commands like "up2date -i httpd-devel" to get the latest apxs.. 
and such..

..its a really good read..   so keep that link in your toolbox.   thanks 
again,

mike

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mike,
>
> mike spisak wrote:
>   
>> ...I've spun on this long enough..  how easy is the apache upgrade to
>> 2.0.58?  ..i may want to take you up on the binary offer..
>>     
>
> Well, it depends on how you have to install the server itself. If you
> have to do something weird within your plesk environment, then you might
> just end up with a broken 2.0.58 environment (in which case, I can give
> you a binary, but can you really trust me? ;)
>
> On the other hand, if you just download the source package and compile
> and install it "as usual", then you should end up with a proper copy of
> apxs and you'll be able to build mod_jk no problem.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF6ZAa9CaO5/Lv0PARAoiJAJ9Th6Ob3tTPqg9Xk95/QxC0qlrlfQCgiD58
> UwRGHxFIKUbe1HbA33UR6cY=
> =hLC1
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike,

mike spisak wrote:
> ...I've spun on this long enough..  how easy is the apache upgrade to
> 2.0.58?  ..i may want to take you up on the binary offer..

Well, it depends on how you have to install the server itself. If you
have to do something weird within your plesk environment, then you might
just end up with a broken 2.0.58 environment (in which case, I can give
you a binary, but can you really trust me? ;)

On the other hand, if you just download the source package and compile
and install it "as usual", then you should end up with a proper copy of
apxs and you'll be able to build mod_jk no problem.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF6ZAa9CaO5/Lv0PARAoiJAJ9Th6Ob3tTPqg9Xk95/QxC0qlrlfQCgiD58
UwRGHxFIKUbe1HbA33UR6cY=
=hLC1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by mike spisak <ms...@pb.net>.
Hi Chris,

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mike,
>
> mike spisak wrote:
>   
>> Christopher Schultz wrote:
>>     
>>> Hmm... if you have Apache2 installed, you ought to have apxs2 somewhere.
>>>       
>> That's what i figured too.. i did not install apache2 myself, it came on
>> a virtual dedicated server that i purchased from a provider i need not
>> mention..    so, when i do "/usr/sbin/httpd -v" - i get: "Server
>> version: Apache/2.0.54"  -- when i do a "find / -name apxs" - i get:
>> "/usr/local/psa/admin/bin/apxs"  --but I know this won't work, as I've
>> tried to compile and use the apache-1.3 generated mod_jk.so file with
>> apache2 and it fails with a nasty error...
>>     
>
> Right: you /must/ compile mod_jk to match your Apache version.
>
>   
>> (btw: the virtual server uses plesk, if that matters).
>>     
>
> Perhaps, but probably not. I don't know anything about plesk, so let's
> hope it doesn't matter ;)
>
>   
>>> ..anything else you can suggest?   ..much thanks in advance,
>>>       
>
> You mentioned apache-1.3... do you have that installed in parallel? Is
> /usr/local/psa/admin/bin/apxs actually the 1.3 version of apxs?
>
> You might want to ask your system administrator about the 2.0 install.
> If you are the sys admin, you might want to file a support request with
> your VM operator, 'cause it looks like things are not set up in a sane way.
>
> If you upgrade to 2.0.58, use the same compiler as me, and are working
> on I32 hardware, I can give you my binary ;)
>
> - -chris
>   
Unfort, I searched the system and found no other apache there.. I'm 
guessing the apxs is 1.3 since the mod_jk "./configure 
--with-apxs=<path>" thought it was - and then compiled the mod_jk for 
apache-1.3..  I tried a few other command switches which didn't work 
(e.g. --with-apxs2=<path to apxs>) oh well...   
Yes, I *am* the sys admin ;-)  ...but, I didn't install/provision the 
box..  I agree with you, the config just doesn't appear to be correct.

...I've spun on this long enough..  how easy is the apache upgrade to 
2.0.58?  ..i may want to take you up on the binary offer.. 

--thanks,
Mike



> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF6K+E9CaO5/Lv0PARAnNxAJ9vcniV4oSD6etePOCK8LoH3/c1EgCeKK+6
> vhT4IdWqGARvHeXcWbvtUjI=
> =ZxMZ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike,

mike spisak wrote:
> Christopher Schultz wrote:
>> Hmm... if you have Apache2 installed, you ought to have apxs2 somewhere.
>
> That's what i figured too.. i did not install apache2 myself, it came on
> a virtual dedicated server that i purchased from a provider i need not
> mention..    so, when i do "/usr/sbin/httpd -v" - i get: "Server
> version: Apache/2.0.54"  -- when i do a "find / -name apxs" - i get:
> "/usr/local/psa/admin/bin/apxs"  --but I know this won't work, as I've
> tried to compile and use the apache-1.3 generated mod_jk.so file with
> apache2 and it fails with a nasty error...

Right: you /must/ compile mod_jk to match your Apache version.

> (btw: the virtual server uses plesk, if that matters).

Perhaps, but probably not. I don't know anything about plesk, so let's
hope it doesn't matter ;)

>> ..anything else you can suggest?   ..much thanks in advance,

You mentioned apache-1.3... do you have that installed in parallel? Is
/usr/local/psa/admin/bin/apxs actually the 1.3 version of apxs?

You might want to ask your system administrator about the 2.0 install.
If you are the sys admin, you might want to file a support request with
your VM operator, 'cause it looks like things are not set up in a sane way.

If you upgrade to 2.0.58, use the same compiler as me, and are working
on I32 hardware, I can give you my binary ;)

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF6K+E9CaO5/Lv0PARAnNxAJ9vcniV4oSD6etePOCK8LoH3/c1EgCeKK+6
vhT4IdWqGARvHeXcWbvtUjI=
=ZxMZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by mike spisak <ms...@pb.net>.
Hey Chris,

Thanks so much for the response...  please see my responses below..

Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mike,
>
> mike spisak wrote:
>   
>> long story short, i need the JkUnMount capability from mod_jk  - i have
>> mod_jk 1.2.6 (I need a newer version).  so, here we go:
>> running: apache 2.0.54, tomcat 5 -
>> i downloaded and unzipped mod_jk 1.2.21 - tried to compile myself.. i
>> have apxs, but not apxs2... so the compilation produced a mod_jk.so for
>> apache-1.3 (which won't work for my apache2).. 
>>     
>
>
> Hmm... if you have Apache2 installed, you ought to have apxs2 somewhere.
> Did you install Apache httpd yourself? If so, look at how you did the
> installation. If you used a package for your OS, then it might be in a
> "standard" location.
>
> For instance, I use Gentoo Linux and installed Apache2 using their
> package manager. apxs2 gets installed in /usr/sbin/apxs2, but it's not
> in the PATH for my lowly "chris" user on my server. So, I have to
> specify the full path myself (i.e. "./configure
> - --with-apxs=/usr/sbin/apxs2").
>
>   
That's what i figured too.. i did not install apache2 myself, it came on 
a virtual dedicated server that i purchased from a provider i need not 
mention..    so, when i do "/usr/sbin/httpd -v" - i get: "Server 
version: Apache/2.0.54"  -- when i do a "find / -name apxs" - i get: 
"/usr/local/psa/admin/bin/apxs"  --but I know this won't work, as I've 
tried to compile and use the apache-1.3 generated mod_jk.so file with 
apache2 and it fails with a nasty error...   (btw: the virtual server 
uses plesk, if that matters)..

..anything else you can suggest?   ..much thanks in advance,
Mike
>> so:
>>
>> 1- can anyone tell me how to work around the apxs / apxs2 thing?
>>     
>
> Try searching for it... if it's not there, your Apache installation is
> broken. Try something like:
>
> $ find /usr -name apxs2 -print
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF6JuK9CaO5/Lv0PARAtx4AJ4zteAkaKjmmWZSuaZvZ9L8ifO/7QCgn/mO
> PHZP64fNfuS86m9LFhvgH1o=
> =KBKf
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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: mod_jk 1.2.21, apxs, and apache 2.0.54

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike,

mike spisak wrote:
> long story short, i need the JkUnMount capability from mod_jk  - i have
> mod_jk 1.2.6 (I need a newer version).  so, here we go:
> running: apache 2.0.54, tomcat 5 -
> i downloaded and unzipped mod_jk 1.2.21 - tried to compile myself.. i
> have apxs, but not apxs2... so the compilation produced a mod_jk.so for
> apache-1.3 (which won't work for my apache2).. 


Hmm... if you have Apache2 installed, you ought to have apxs2 somewhere.
Did you install Apache httpd yourself? If so, look at how you did the
installation. If you used a package for your OS, then it might be in a
"standard" location.

For instance, I use Gentoo Linux and installed Apache2 using their
package manager. apxs2 gets installed in /usr/sbin/apxs2, but it's not
in the PATH for my lowly "chris" user on my server. So, I have to
specify the full path myself (i.e. "./configure
- --with-apxs=/usr/sbin/apxs2").

> so:
> 
> 1- can anyone tell me how to work around the apxs / apxs2 thing?

Try searching for it... if it's not there, your Apache installation is
broken. Try something like:

$ find /usr -name apxs2 -print

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF6JuK9CaO5/Lv0PARAtx4AJ4zteAkaKjmmWZSuaZvZ9L8ifO/7QCgn/mO
PHZP64fNfuS86m9LFhvgH1o=
=KBKf
-----END PGP SIGNATURE-----

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