tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MURAT BALKAS" <murat.bal...@o2.net.tr>
Subject RE: mod_jk + tomcat on Solaris 8 ( about Turner's HOWTO )
Date Tue, 29 Oct 2002 23:26:01 GMT

My mod_jk.so is at the default location with other modules :
/usr/apache/libexec/mod_jk.so

All of my configuration files are attached with comments. If I go over them
I realised that I'm really confused about

a) ports ( Should both of them bind to same port? How? )
      Now, my apache listens on port 80 and my tomcat listens on port 443.
Is it right? When I start tomcat I start an engine on port 443.
b) virtualhosts
      On server.xml and workers.properties I've defined only localhost. But
on httpd.conf although my ServerName is localhost I've defined another
VirtualHost. Is it right?

Please help me. I'm really confused.

Murat BALKAS

My server.xml file : ( related lines )
------------------
...
...
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
        modJK= "/usr/apache/libexec/mod_jk.so" jkDebug="debug"
        workersConfig
="/usr/local/jakarta-tomcat-4.0.4/conf/jk/workers.properties"
        jkLog="/usr/local/jakarta-tomcat-4.0.4/logs/mod_jk.log"/>
...
...

<!-- This is the only HttpConnector on port 443 -->
<Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="443" minProcessors="5" maxProcessors="75"
               enableLookups="true"
               acceptCount="10" debug="0" scheme="https" secure="true">
      <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
               clientAuth="false" keystoreFile="/usr/location/of/keystore"
               keystorePass="mypasswordishere" protocol="TLS"/>
</Connector>
...
...
<!-- This is Ajp13Connector -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
...
...
<!-- This is the Engine which I start on startup -->
<Engine name="Standalone" defaultHost="localhost" debug="0">
...
...
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
 <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append
="true" forwardAll="false" />
...
...
<!-- My ROOT dir -->
<Context path="" docBase="myapprootdir" debug="0"
                 reloadable="true" crossContext="true"/>
...
...

My workers.properties file :
-------------------------

# BEGIN workers.properties
#
# Setup for apache system
#
# (optional) make this equal to CATALINA_HOME
workers.tomcat_home=/usr/local/jakarta-tomcat-4.0.4
#
# (optional) make this equal to JAVA_HOME
workers.java_home=/usr/j2se
#
ps=/
worker.list=ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009

# change this line to match apache ServerName and Host name in server.xml
worker.ajp13.host=localhost

worker.ajp13.type=ajp13
#
# END workers.properties

My httpd.conf ( related lines ) :
------------------------------
...
...
ServerType standalone
...
...
# Bind on port 80, leave 443 for tomcat
Port 80
...
...
# Listen only on 80 not 443
<IfDefine SSL>
Listen 80
# Listen 443
</IfDefine>
...
...
# ServerName same as server.xml host directive
ServerName localhost
...
...
# I don't know why a virtualhost listening on 443 ????
<VirtualHost _default_:443>
...
...
# include mod_jk.conf
Include /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf
...
...
# another virtualhost. I'm really confused.
<VirtualHost 212.65.135.xyz>
ServerAdmin murat.balkas@o2.net.tr
DocumentRoot /usr/local/myapprootdir/mydir
ServerName test.x.net.tr
</VirtualHost>

My mod_jk.conf :
----------------

########## Auto generated on Tue Oct 29 12:19:47 EET 2002##########

<IfModule !mod_jk.c>
  LoadModule jk_module libexec/mod_jk.so
</IfModule>

JkWorkersFile "/usr/local/jakarta-tomcat-4.0.4/conf/jk/workers.properties"
JkLogFile "/usr/local/jakarta-tomcat-4.0.4/logs/mod_jk.log"

JkLogLevel debug

<VirtualHost localhost>
    ServerName localhost

    #################### localhost:/EasyBridge ####################

    # Static files
    Alias /EasyBridge "/usr/local/jakarta-tomcat-4.0.4/webapps/EasyBridge"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/EasyBridge">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/EasyBridge/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/EasyBridge/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /EasyBridge/jsp/security/login/j_security_check  ajp13
    JkMount /EasyBridge/snoop  ajp13
    JkMount /EasyBridge/*.snp  ajp13
    JkMount /EasyBridge/*.jsp  ajp13
    JkMount /EasyBridge/servlet/*  ajp13
    JkMount /EasyBridge/servletToJsp  ajp13

    #################### localhost:/examples ####################

    # Static files
    Alias /examples "/usr/local/jakarta-tomcat-4.0.4/webapps/examples"

   <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13

    #################### localhost:/webdav ####################

    # Static files
    Alias /webdav "/usr/local/jakarta-tomcat-4.0.4/webapps/webdav"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/webdav">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp index.html index.htm
    </Directory>

    # Deny direct access to WEB-INF and META-INF
   <Location "/webdav/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/webdav/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /webdav/*.jsp  ajp13
    JkMount /webdav/servlet/*  ajp13

    #################### localhost:/tomcat-docs ####################

    # Static files
    Alias /tomcat-docs
"/usr/local/jakarta-tomcat-4.0.4/webapps/tomcat-docs"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/tomcat-docs">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/tomcat-docs/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/tomcat-docs/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /tomcat-docs/*.jsp  ajp13
    JkMount /tomcat-docs/servlet/*  ajp13

    #################### localhost:/manager ####################

    # Static files
    Alias /manager "/usr/local/jakarta-tomcat-4.0.4/webapps/manager"

    <Directory "/usr/local/jakarta-tomcat-4.0.4/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>
   # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/servlet/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>



                                                                                         
                                             
                      "Tref Gare"                                                        
                                             
                      <TrefG@areeba.com        To:       "Tomcat Users List" <tomcat-user@jakarta.apache.org>
                         
                      .au>                     cc:                                    
                                                
                                               Subject:  RE: mod_jk + tomcat on Solaris 8
( about Turner's HOWTO )                     
                      10/29/2002 11:35                                                   
                                             
                      PM                                                                 
                                             
                      Please respond to                                                  
                                             
                      "Tomcat Users                                                      
                                             
                      List"                                                              
                                             
                                                                                         
                                             
                                                                                         
                                             




Where is your mod_jk.so installed?

And secondly what does your mod_jk.conf look like
(CATALINA_HOME/conf/auto/mod_jk.conf)

I'd say between those two we'll find the culprit.

cheers

------------------------------------------------------
Tref Gare
Development Consultant
Areeba
Level 19/114 William St, Melbourne VIC 3000
email: trefg@areeba.com.au
phone: +61 3 9642 5553
fax: +61 3 9642 1335
website: http://www.areeba.com.au
------------------------------------------------------
"This email is intended only for the use of the individual or entity
named above and contains information that is confidential. No
confidentiality is waived or lost by any mis-transmission. If you
received this correspondence in error, please notify the sender and
immediately delete it from your system. You must not disclose, copy or
rely on any part of this correspondence if you are not the intended
recipient. Any communication directed to clients via this message is
subject to our Agreement and relevant Project Schedule. Any information
that is transmitted via email which may offend may have been sent
without knowledge or the consent of Areeba."
------------------------------------------------------

-----Original Message-----
From: MURAT BALKAS [mailto:murat.balkas@o2.net.tr]
Sent: Tuesday, 29 October 2002 9:28 PM
To: Tomcat Users List
Subject: RE: mod_jk + tomcat on Solaris 8 ( about Turner's HOWTO )


Thanks. I've downloaded it from the link below, and followed the other
instructions.

When I start tomcat I get :

mod_jk location: libexec/mod_jk.so
Make sure it is installed corectly or  set the config location
Using <ApacheConfig modJk="PATH_TO_MOD_JK.SO_OR_DLL" />

And If I try to open examples directory I get :

[Tue Oct 29 12:15:11 2002]  [jk_uri_worker_map.c (477)]: Attempting to
map
URI '/examples/jsp/num/numguess.jsp'
[Tue Oct 29 12:15:11 2002]  [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match

INFO : I've used localhost on tomcat's Host directive, apache's
ServerName
and worker.ajp13.host.

      What's the problem?

Murat





                      "Turner, John"

                      <JTurner@AAS.com>        To:       'Tomcat Users
List' <tomcat-user@jakarta.apache.org>
                                               cc:

                      10/28/2002 10:08         Subject:  RE: mod_jk +
tomcat on Solaris 8 ( about Turner's HOWTO )
                      PM

                      Please respond to

                      "Tomcat Users

                      List"










There's no need to build the connectors from source unless you want to.

You can get Solaris 8 JK binaries here:

http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1
.2.0

/bin/solaris8/

There aren't any JK2 binaries yet, but I'm sure someone on the list has
them.

John

> -----Original Message-----
> From: MURAT BALKAS [mailto:murat.balkas@o2.net.tr]
> Sent: Monday, October 28, 2002 2:30 PM
> To: Tomcat Users List
> Subject: Re: mod_jk + tomcat on Solaris 8 ( about Turner's HOWTO )
>
>
>
> MORE INFO :
>
>       after realising that I will not be able to find the file
> Makefile.linux I tried the second method which is traditional
> configure
> method. But, after installing every required package and running
> ./buildconf.sh I get :
>
> libtoolize --force --automake --copy
> aclocal
> automake -a --foreign -i --copy
> autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4
> configure.in: `AM_INIT_AUTOMAKE' must be used
> automake: your implementation of AM_INIT_AUTOMAKE comes from an
> automake: old Automake version.  You should recreate aclocal.m4
> automake: with aclocal and run automake again.
> configure.in: installing `./install-sh'
> configure.in: installing `./mkinstalldirs'
> configure.in: installing `./missing'
> automake: no `Makefile.am' found or specified
> autoconf
> autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4
>
>       I get /usr/local/bin/m4 when I do 'which m4' but I can
> not force my
> system to use /usr/local/bin/m4.
>
> Murat BALKAS
>
>
>
>
>
>
>                       "MURAT BALKAS"
>
>
>                       <murat.balkas@o2.        To:
> "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>
>                       net.tr>                  cc:
>
>
>                                                Subject:
> mod_jk + tomcat on Solaris 8 ( about Turner's HOWTO )
>
>                       10/28/2002 08:22
>
>
>                       PM
>
>
>                       Please respond to
>
>
>                       "Tomcat Users
>
>
>                       List"
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi,
>
>       I've read your HOWTO and followed the instructions.
> Until the item
> "f" I didn't have any difficulty. But, on the time f I couldn't find
> Makefile.linux to change it to suite for my system.
>
>       Did I forget anything?
>
>       Thanks for the HOWTO. It's what I was looking for.
>
> Murat
>
>
>
>
>                       "Turner, John"
>
>                       <JTurner@AAS.com>        To:       'Tomcat Users
> List' <tomcat-user@jakarta.apache.org>
>                                                cc:
>
>                       10/28/2002 06:32         Subject:  RE:
> mod_jk runs
> but doesnt process
>                       PM
>
>                       Please respond to
>
>                       "Tomcat Users
>
>                       List"
>
>
>
>
>
>
>
>
> http://www.johnturner.com/howto
>
> workers.properties is a file used by mod_jk.  Mod_jk is used
> by Apache to
> connect to Tomcat to serve JSP and servlet requests.  If you
> do not have
> Apache or use Apache, you do not need mod_jk.so or workers.properties.
>
> mod_jk.conf-auto is also known as mod_jk.conf.  This file is
> created by
> Tomcat on startup if Tomcat is configured to create it.  It
> contains the
> Apache directives that belong in httpd.conf in order to use
> mod_jk.so to
> connect to Tomcat.
>
> Tomcat supports virtual hosts out of the box.  In the default
> server.xml,
> there is already a virtual host configured, it is called "localhost".
>
> If you could be more clear what you want to do, plenty of
> people here can
> help.  You might also want to start a new thread instead of
> hijacking this
> one.
>
> John
>
> > -----Original Message-----
> > From: MURAT BALKAS [mailto:murat.balkas@o2.net.tr]
> > Sent: Monday, October 28, 2002 10:52 AM
> > To: Tomcat Users List
> > Subject: RE: mod_jk runs but doesnt process
> >
> >
> >
> > I need some help about apache + tomcat + virtual hosts.
> >
> > I'm using jakarta-tomcat-4.0.4 and I've a working system. I
> > need to make
> > the working system support virtual hosting.
> > When looking at the documentation I always see some config
> > files which I do
> > not have. e.g. : workers.properties,  mod_jk.conf-auto, ...
> > I'm really confused.
> >
> > Is there any step by step HOWTO which explains mod_jk
> installation for
> > binary tomcat releases.
> >
> > Any help would be greatly appreciated.
> >
> > Murat BALKAS
> >
> >
> >
> >
> >
> >
> >                       "Turner, John"
> >
> >
> >                       <JTurner@AAS.com>        To:
> > 'Tomcat Users List' <tomcat-user@jakarta.apache.org>
> >
> >                                                cc:
> >
> >
> >                       10/28/2002 03:09         Subject:  RE:
> > mod_jk runs but doesnt process
> >
> >                       PM
> >
> >
> >                       Please respond to
> >
> >
> >                       "Tomcat Users
> >
> >
> >                       List"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Does the request ever get to Tomcat?  What's in Tomcat's logs?
> >
> > John
> >
> >
> > > -----Original Message-----
> > > From: Benjamin Charles Tehan [mailto:benjamin@evolutionism.org]
> > > Sent: Monday, October 28, 2002 5:50 AM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: mod_jk runs but doesnt process
> > >
> > >
> > > I have a small problem with mod_jk
> > >
> > > It loads with apache ok, and when I goto
> > > http://localhost/index.jsp it runs
> > > but I get no result back from the web server, though I can
> > > see the connection
> > > in mod_jk.log (attached below)
> > >
> > > Once it gets to "Into ajpv12_handle_response" it stops and
> > > the browser stays
> > > connected with no responce, i tried a simple hello word
> jsp script.
> > >
> > > I'm Running linux (debian 3.0)
> > > I'm Running jakarta-tomcat-4.1.12 binary version
> > > I'm Running jakarta-tomcat-connectors-4.1.12-src compiled
> > from source
> > > apxs -o /usr/lib/apache/mod_jk.so -I../common/
> > > -I${JAVA_HOME}/include/ \
> > > -I${JAVA_HOME}/include/linux -c *.c ../common/*.c
> > >
> > > This has previously worked, I'm sure missed something small
> > > in the config
> > > files some where
> > >
> > > ---------------------
> > > httpd.conf is simply
> > > ---------------------
> > >
> > > LoadModule jk_module        lib/apache/mod_jk.so
> > > AddModule mod_jk.c
> > >
> > > <IfModule mod_jk.c>
> > >   JkWorkersFile /usr/local/tomcat/conf/workers.properties
> > >   JkLogFile /usr/local/tomcat/logs/mod_jk.log
> > >   JkLogLevel debug
> > >   JkMount /*.jsp ajp13
> > >   JkMount /servlet/* ajp13
> > > </IfModule>
> > >
> > > ------------------------------
> > > workers.properties is simply
> > > ------------------------------
> > >
> > > workers.tomcat_home=/usr/local/tomcat
> > > workers.catalina_home=/usr/local/tomcat
> > > workers.java_home=/usr/local/j2sdk1.4.0_01
> > >
> > > ps=/
> > > worker.list=ajp12, ajp13
> > > worker.ajp13.port=8009
> > > worker.ajp13.host=127.0.0.1
> > > worker.ajp12.type=ajp13
> > >
> > > ------------------------
> > > Part of the mod_jk.log
> > > ------------------------
> > >
> > > [Tue Oct 29 06:45:47 2002]  [jk_uri_worker_map.c (460)]: Into
> > > jk_uri_worker_map_t::map_uri_to_worker
> > > [Tue Oct 29 06:45:47 2002]  [jk_uri_worker_map.c (477)]:
> > > Attempting to map
> > > URI '/index.jsp'
> > > [Tue Oct 29 06:45:47 2002]  [jk_uri_worker_map.c (558)]:
> > > jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match ajp13
> > > -> *.jsp
> > > [Tue Oct 29 06:45:47 2002]  [jk_worker.c (132)]: Into
> > > wc_get_worker_for_name
> > > ajp13
> > > [Tue Oct 29 06:45:47 2002]  [jk_worker.c (136)]:
> > > wc_get_worker_for_name, done
> > >  found a worker
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (242)]: Into
> > > jk_worker_t::get_endpoint
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (137)]: Into
> > > jk_endpoint_t::service
> > > [Tue Oct 29 06:45:47 2002]  [jk_connect.c (132)]: Into
> > jk_open_socket
> > > [Tue Oct 29 06:45:47 2002]  [jk_connect.c (139)]:
> > > jk_open_socket, try to
> > > connect socket = 7
> > > [Tue Oct 29 06:45:47 2002]  [jk_connect.c (148)]:
> > > jk_open_socket, after
> > > connect ret = 0
> > > [Tue Oct 29 06:45:47 2002]  [jk_connect.c (157)]:
> > jk_open_socket, set
> > > TCP_NODELAY to on
> > > [Tue Oct 29 06:45:47 2002]  [jk_connect.c (174)]:
> > > jk_open_socket, return, sd
> > > = 7
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (151)]: In
> > > jk_endpoint_t::service, sd = 7
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (398)]: Into
> > > ajpv12_handle_request
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (402)]:
> > > ajpv12_handle_request,
> > > sending the ajp12 start sequence
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (466)]:
> > > ajpv12_handle_request,
> > > sending the headers
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (485)]:
> > > ajpv12_handle_request,
> > > sending the terminating mark
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (530)]:
> > > ajpv12_handle_request
> > > done
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (165)]: In
> > > jk_endpoint_t::service, sent request
> > > [Tue Oct 29 06:45:47 2002]  [jk_ajp12_worker.c (546)]: Into
> > > ajpv12_handle_response
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:   <
> > mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <
> > mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <
> mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:tomcat-user-help@jakarta.apache.org>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:tomcat-user-help@jakarta.apache.org>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@jakarta.apache.org>







--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@jakarta.apache.org>







--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message