Thanks, I already solved this problem.
mod_jk2 has a little bug: it looks for *.properties in "`apxs -q
prefix`/conf"
    instead of `apxs -q sysconfdir`.

----- Original Message ----- 
From: "Nikola Milutinovic" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, June 21, 2004 12:00 PM
Subject: Re: workers2.properties path ???


> Elijah Epifanov wrote:
> > Silly question:
> >     Where do I need to store my workers2.properties file if my apache
> >     isn't contained in one directory?
> >     /var/conf/apache2 - replacement for ${APACHE2}/conf
> >     /usr/local/apache2 - Apache2 root
>
> Well, if you're going to re-organize your Apache, then I sugest you
> follow DEC's logic, which I implement on my Tru64 UNIX, with slight
> modifications. DEC's "setld" utility can help with creation of symbolic
> links from OPT areas to system-standard areas, like /usr/bin, /usr/sbin,
> /usr/shlib,...
>
> Separate each of your RPMs into three areas:
>
> 1. BOOT
>
> In my case, this is /opt/Apache-2.0.49/ - ./sbin/(init.d/apache,
> rc3.d/S93apache, rc0.d/K01apache, rc2.d/K01apache). The SETLD SCP will
> automagically create links to these files in /sbin/(init.d,...)
>
> 2. USR
>
> For me this is /usr/opt/Apache-2.0.49/* This dir tree holds all files
> considered read-only from user's view and during normal operations. This
> is the bulk of the instalation, all executables, libraries, header files
> and, yes, config files. Why config? Well, it doesn't change *during*
> Apache's operation, does it?
>
> 3. VAR
>
> Here, we place VARiable files, files that can change during normal
> operation. For me it is in /var/opt/Apache-2.0.49. This dir tree holds
> logs, proxy cache (in case of PostgreSQL it would hold the database), etc.
>
> For your case, you'd most likely place startup files directly in their
> expected places, put logs under /var/log/httpd/ and for the rest of the
> files, well, it's up to you.
>
> I consider "/usr/local" to be for "quick'n'dirty", "just slap it
> together" type of instalation. Anything else I intend to use for a
> longer period of time, I package. Having 14 AlphaServers to attend to
> tought me the value of a cleanly packaged software. Your case might
differ.
>
> Linux has /opt area which can be a separate file system. I've seen a
> couple of /usr/opt instalations. I guess there are no strict rules and
> it would be most prudent to follow the style imposed by your distro.
>
> > error_log:
> > [Sun Jun 20 09:02:35 2004] [notice] Apache/2.0.49 (Unix) mod_ssl/2.0.49
> >     OpenSSL/0.9.6g mod_jk2/2.0.4 configured -- resuming normal
operations
> > [Sun Jun 20 09:02:35 2004] [error] uriEnv.init() map to invalid worker
> >     /tomcat ajp13:localhost:8009
> > ^^^^^^end^^^^^^
>
> I guess it is not finding this worker, which would mean it is not
> finding the "workers2.properties" file you mention below. As a note, you
> could keep all URI mappings in workers2 file... It is just your own
> personal feeling of what is more stable WORKERS definitions or URI/VHost
> definitions.
>
> > workers2.properties:
> > [channel.socket:localhost:8009]
> > tomcatId=localhost:8009
> >
> > [ajp13:localhost:8009]
> > channel=channel.socket:localhost:8009
> >
> > [uri:/jsp-examples]
> > info=JSP Examples
> > ^^^^^^end^^^^^^
> >
> > Everything worked ok before I decided to make a clean installation with
more
> > organized tree.
>
> Well, one thing that I do and which might help you...
>
> I keep mod_jk2 in a separate install package dir. At first, I used to
> copy "workers2.properties" file to Apache's config (SCP script would
> query "apxs" upon package install). The module loading and global setup
> was done via config fragment file, as is done by Mandrake -
> ${APACHE_HOME}/conf/add-on/ holds all such fragments.
>
> So, I added to the JK2.conf this (notice the "config.file"):
>
> <IfDefine HAVE_JK2>
>    <IfModule !mod_jk2.c>
>      LoadModule jk2_module /usr/opt/Apache_JK2-2.0.4/module/mod_jk2.so
>    </IfModule>
> </IfDefine>
>
> <IfModule mod_jk2.c>
>    #
>    # Restrict access to JK status handler
>    #
>    <Location "/jkstatus/">
>      Order Deny,Allow
>      Deny from all
>      Allow from 127.0.0.1 Brigitte.ev.co.yu
>    </Location>
>
>    #
>    # Restrict access to JBoss JMX console
>    #
>    <Location "/jmx-console/">
>      Order Deny,Allow
>      Deny from all
>      Allow from 127.0.0.1
>    </Location>
>
>    #
>    # Set our (SETLD) location of workers file
>    #
>    JkSet config.file /usr/opt/Apache_JK2-2.0.4/config/workers2.properties
>
>    #
>    # This should go in host settings, be it virtual or global
>    # It can also go into "workers2.properties" file in the [uri]
>    # sections (a more proper place, IMHO)
>    #
>    #<Location /path>
>    #  JkUriSet    worker  ajp13:unixsock
>    #</Location>
> </IfModule>
>
> Nix.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to