ellandrd
asked on
running apache 2.2.x and tomcat 6.0.2
on my laptop im running apache 2.2.x with 16 virtual hosts. im also running PHP 5.2.x with MySQL 5.x. I have just installed tomcat apache 6.0.2 so i can now support JSP and servlets. Can somebody help me configure tomcat and apache so they speak and apache send tomcat apache all jsp requests etc...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
much clearer now!
thank you. i will be configuring tomcat and apache tonight as im in work at the moment...
thank you. i will be configuring tomcat and apache tonight as im in work at the moment...
ASKER
ok im stuck.
im as far as "Simple configuration example". i dont know what to replace for mine to work??
also i dont have a workers.properties file either??
tomcat apache is installed under:
w:\apache\tomcat\conf
w:\apache\tomcat\bin
....
w:\apache\tomcat\webapps
and apache web server is installed under:
w:\apache\conf
w:\apache\htdocs
....
w:\apache\modules
apache wont restart for me now either??
im running apache and tomcat apache on windows xp pro sp2...
im as far as "Simple configuration example". i dont know what to replace for mine to work??
also i dont have a workers.properties file either??
tomcat apache is installed under:
w:\apache\tomcat\conf
w:\apache\tomcat\bin
....
w:\apache\tomcat\webapps
and apache web server is installed under:
w:\apache\conf
w:\apache\htdocs
....
w:\apache\modules
apache wont restart for me now either??
im running apache and tomcat apache on windows xp pro sp2...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
should the workers.properties file be in:
w:/apache/tomcat/conf or
w:/apache/conf
as im getting confused...
what about servlets?
>>tomcat_host_name by DNS name of your server (or IP address)
i have tomcat running on localhost port 8080 or 127.0.0.1:8080... will this be what i have to replace with tomcat_host_name?
w:/apache/tomcat/conf or
w:/apache/conf
as im getting confused...
what about servlets?
>>tomcat_host_name by DNS name of your server (or IP address)
i have tomcat running on localhost port 8080 or 127.0.0.1:8080... will this be what i have to replace with tomcat_host_name?
ASKER
i still cant get apache httpd server to start.
tomcat apache starts fine.
i had to comment out this lines to get apache httpd server:
LoadModule jk_module w:/apache/modules/mod_jk.s o
#AddModule mod_jk.c
#JkWorkersFile w:/apache/tomcat/conf/work ers.proper ties
#JkLogFile w:/apache/logs/mod_jk.log
#JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat "%w %V %T"
#JkMount /*.jsp worker1
i have created the workers.properties file and stored it in w:/apache/tomcat/conf/work ers.proper ties.
i have noticed there is other *.properties files inn that directory too...
in my logs folder i have this: (error.log)
[Wed Nov 22 08:40:05 2006] [notice] Apache/2.2.3 (Win32) PHP/5.2.1-dev mod_jk/1.2.19 configured -- resuming normal operations
[Wed Nov 22 08:40:05 2006] [notice] Server built: Jul 27 2006 16:49:49
[Wed Nov 22 08:40:05 2006] [notice] Parent: Created child process 2876
PHP Warning: PHP Startup: java: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Child process is running
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Acquired the start mutex.
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Starting 250 worker threads.
[Wed Nov 22 08:40:07 2006] [notice] Child 2876: Starting thread to listen on port 80.
tomcat apache starts fine.
i had to comment out this lines to get apache httpd server:
LoadModule jk_module w:/apache/modules/mod_jk.s
#AddModule mod_jk.c
#JkWorkersFile w:/apache/tomcat/conf/work
#JkLogFile w:/apache/logs/mod_jk.log
#JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat "%w %V %T"
#JkMount /*.jsp worker1
i have created the workers.properties file and stored it in w:/apache/tomcat/conf/work
i have noticed there is other *.properties files inn that directory too...
in my logs folder i have this: (error.log)
[Wed Nov 22 08:40:05 2006] [notice] Apache/2.2.3 (Win32) PHP/5.2.1-dev mod_jk/1.2.19 configured -- resuming normal operations
[Wed Nov 22 08:40:05 2006] [notice] Server built: Jul 27 2006 16:49:49
[Wed Nov 22 08:40:05 2006] [notice] Parent: Created child process 2876
PHP Warning: PHP Startup: java: Unable to initialize module\nModule compiled with module API=20060613, debug=0, thread-safety=1\nPHP compiled with module API=20050922, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Child process is running
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Acquired the start mutex.
[Wed Nov 22 08:40:06 2006] [notice] Child 2876: Starting 250 worker threads.
[Wed Nov 22 08:40:07 2006] [notice] Child 2876: Starting thread to listen on port 80.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok ive commented this line out and now apache httpd server wont start...
#LoadModule php5_module "W:/PHP/php5apache2_2.dll"
#LoadModule php5_module "W:/PHP/php5apache2_2.dll"
you should comment out all php related config lines, because it is not only LoadModule.
could you send your httpd.conf file ?
ASKER
ok 2 secs
ASKER
did you get my httpd.conf file?
yes I did, but don't see anything wrong in it.
Maybe something in included conf file conf/extra/httpd-vhosts.co nf ?
Do you syill have the same error in log file ?
Maybe something in included conf file conf/extra/httpd-vhosts.co
Do you syill have the same error in log file ?
ASKER
yes
could you send contents of conf/extra/httpd-vhosts.co nf file too ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
see this worker.properties file - where do i put this? in:
w:/apache/conf
or
w:/apache/tomcat/conf
??
also see the content of the worker file:
worker.list= worker1
worker.worker1.host=tortug a <<------------ do i change this to 127.0.0.1:8080 or 127.0.0.1
worker.worker1.port=8009
worker.worker1.type=ajp13
>>port number changed from 8007 to 8009
why? will have i have to change mine??
w:/apache/conf
or
w:/apache/tomcat/conf
??
also see the content of the worker file:
worker.list= worker1
worker.worker1.host=tortug
worker.worker1.port=8009
worker.worker1.type=ajp13
>>port number changed from 8007 to 8009
why? will have i have to change mine??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok apache httpd server is running on localhost port 80 and tomcat apache is running on localhost port 8080 so which port? apache httpd or tomcat server?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok but do i put localhost as host or localhost:8080 ?
ASKER
i can get tomcat running on localhost:8080 fine and i can get apache running on localhost fine, but still cant get tomcat and apache to work together...
here is my httpd.conf file part:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile w:/apache/conf/workers.pro perties
JkLogFile w:/apache/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /*.jsp worker1
in my workers.properties files in w:/apache/conf/workers.pro perties i have this:
worker.list=worker1
worker.worker1.host=localh ost
worker.worker1.port=8009
worker.worker1.type=ajp13
the ajp section in my server.xml file looks like this:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
here is my httpd.conf file part:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile w:/apache/conf/workers.pro
JkLogFile w:/apache/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /*.jsp worker1
in my workers.properties files in w:/apache/conf/workers.pro
worker.list=worker1
worker.worker1.host=localh
worker.worker1.port=8009
worker.worker1.type=ajp13
the ajp section in my server.xml file looks like this:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
ASKER
and when i start tomcat i get this:
24-Nov-2006 08:48:09 org.apache.catalina.core.A prLifecycl eListener lifecycleEve
t
INFO: The Apache Tomcat Native library which allows optimal performance in prod
ction environments was not found on the java.library.path: C:\Java\jdk1.6.0\bin
.;C:\WINDOWS\Sun\Java\bin; C:\WINDOWS \system32; C:\WINDOWS ;C:\WINDOW S\system32 ;C:
WINDOWS;C:\WINDOWS\System3 2\Wbem;C:\ Program Files\Microsoft SQL Server\80\Tools\BINN;C:
WINDOWS\system32;C:\WINDOW S;%CATALIN A_HOME%\bi n\startup; C:\Java\jd k1.6.0\bin ;C:
Java\ant\bin;C:\PHP\;W:\Pe rl\bin\per l.exe\;W:\ OpenSSL\bi n\;
24-Nov-2006 08:48:09 org.apache.coyote.http11.H ttp11Proto col init
INFO: Initializing Coyote HTTP/1.1 on http-8080
24-Nov-2006 08:48:09 org.apache.catalina.startu p.Catalina load
INFO: Initialization processed in 621 ms
24-Nov-2006 08:48:09 org.apache.catalina.core.S tandardSer vice start
INFO: Starting service Catalina
24-Nov-2006 08:48:09 org.apache.catalina.core.S tandardEng ine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.2
24-Nov-2006 08:48:09 org.apache.catalina.core.S tandardHos t start
INFO: XML validation disabled
24-Nov-2006 08:48:10 org.apache.coyote.http11.H ttp11Proto col start
INFO: Starting Coyote HTTP/1.1 on http-8080
24-Nov-2006 08:48:10 org.apache.jk.common.Chann elSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
24-Nov-2006 08:48:10 org.apache.jk.server.JkMai n start
INFO: Jk running ID=0 time=10/20 config=null
24-Nov-2006 08:48:10 org.apache.catalina.startu p.Catalina start
INFO: Server startup in 921 ms
24-Nov-2006 08:48:09 org.apache.catalina.core.A
t
INFO: The Apache Tomcat Native library which allows optimal performance in prod
ction environments was not found on the java.library.path: C:\Java\jdk1.6.0\bin
.;C:\WINDOWS\Sun\Java\bin;
WINDOWS;C:\WINDOWS\System3
WINDOWS\system32;C:\WINDOW
Java\ant\bin;C:\PHP\;W:\Pe
24-Nov-2006 08:48:09 org.apache.coyote.http11.H
INFO: Initializing Coyote HTTP/1.1 on http-8080
24-Nov-2006 08:48:09 org.apache.catalina.startu
INFO: Initialization processed in 621 ms
24-Nov-2006 08:48:09 org.apache.catalina.core.S
INFO: Starting service Catalina
24-Nov-2006 08:48:09 org.apache.catalina.core.S
INFO: Starting Servlet Engine: Apache Tomcat/6.0.2
24-Nov-2006 08:48:09 org.apache.catalina.core.S
INFO: XML validation disabled
24-Nov-2006 08:48:10 org.apache.coyote.http11.H
INFO: Starting Coyote HTTP/1.1 on http-8080
24-Nov-2006 08:48:10 org.apache.jk.common.Chann
INFO: JK: ajp13 listening on /0.0.0.0:8009
24-Nov-2006 08:48:10 org.apache.jk.server.JkMai
INFO: Jk running ID=0 time=10/20 config=null
24-Nov-2006 08:48:10 org.apache.catalina.startu
INFO: Server startup in 921 ms
ASKER
ASKER
i got JSP pages working... sorry it was my own stupidy!
how about serlvets?
how about serlvets?
ASKER
and another thing i dont understand and im hoping you'll clear up is do i have to put all my .jsp pages under exmaples directory on tomcat apache server or can i put them under:
w:/apache/htdocs/jsp/
if so how come i cant get them to work? the message i get is this:
HTTP Status 404 - /jsp/index.jsp
type Status report
message /jsp/index.jsp
description The requested resource (/jsp/index.jsp) is not available.
Apache Tomcat/6.0.2
also how can i get servlets working?
w:/apache/htdocs/jsp/
if so how come i cant get them to work? the message i get is this:
HTTP Status 404 - /jsp/index.jsp
type Status report
message /jsp/index.jsp
description The requested resource (/jsp/index.jsp) is not available.
Apache Tomcat/6.0.2
also how can i get servlets working?
for servlets you should add additional JkMount config line based on URL path.
for example to make path /examples/servets to redirect to Tomcat add in httpd.conf file:
JkMount /examples/servlets/*
for example to make path /examples/servets to redirect to Tomcat add in httpd.conf file:
JkMount /examples/servlets/*
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok last question before i accept - can you clear up thist please:
11/24/2006 09:14AM GMT
11/24/2006 09:14AM GMT
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you for all your help and patience with me.
your explanations where great!
ellandrd
your explanations where great!
ellandrd
ASKER
however, my understanding of how tomcat apache and apache http server work together is a little poor.
can you answer this question for me please.
when i try running a PHP page under:
w:\apache\htdocs\index.php
apache will handle it on its own right? but when i try running a JSP page under:
w:\apache\htdocs\index.jsp
will apache send the request to tomcat server and retreive the results again or will i have to call the JSP from the tomcat server like:
w:\apache\tomcat\webapps\r
see this is where i get all confused to how it actually works??