DeveloperSide.NET Forums
December 12, 2019, 11:49:58 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Trouble integrating Apache HTTP server with Tomcat  (Read 5329 times)
0 Members and 1 Guest are viewing this topic.
xamule
Member
*
Posts: 1


View Profile
« on: March 06, 2007, 03:50:29 PM »

Hi everyone,

I am currently doing a project which requires me to integrate Apache HTTP server with Tomcat. I am using Apache HTTP server 2.2.3 and Apache Tomcat 6.
My Apache's path is "C:\Apache" whereas my Tomcat's path is "C:\Tomcat". I am trying to integrate them using mod_jk. I have downloaded a binary version of mod_jk (mod_jk.so) and have put it into "C:\Apache\modules". From tutorials I found from the net, I have created a "workers.properties" file and put it in "C:\Apache\conf".

My workers.properties file looks like this:

# Define worker 'example'
worker.list=example

# Set properties for worker 'example' (ajp13)
worker.example.type=ajp13
worker.example.host=localhost
worker.example.port=8009

worker.example.cachesize=10
worker.example.cache_timeout=600
worker.example.socket_keepalive=1
worker.example.reclycle_timeout=300


I have also edited my httpd.conf file by adding the following lines at the end of my file:

LoadModule jk_module modules/mod_jk.so

<IfModule mod_jk.c>

JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

Alias /jsp-examples "C:/Tomcat/webapps/try_success/"

<Directory "C:/Tomcat/webapps/try_success/">
Options Indexes +FollowSymLinks
AllowOverride None
Allow from all
</Directory>

<Location /*/WEB-INF/*>
AllowOverride None
deny from all
</Location>

JkMount /try_success/*.jsp example

</IfModule>


"C:/Tomcat/webapps/try_success/" is the directory I used to develop my application. Inside /try_success directory I have a jsp file called "Hello.jsp" and a html file called "postform.html". After performing the steps above, I failed to load the jsp file through the browser but then I could load the html file.

I typed "http://localhost/try_success/Hello.jsp" in the address bar. It tried to open the page but in the end it showed an error message called "Service Temporarily Unavailable". But then when I typed in "http://localhost/try_success/postform.html", the html page loaded perfectly. I suspect I "JkMount"ed wrongly. What's the problem? Please provide some help. Thank you :)
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: March 06, 2007, 03:57:46 PM »

Alias /jsp-examples "C:/Tomcat/webapps/try_success/"
JkMount /try_success/*.jsp example

Should probably be this instead...
Alias /try_success "C:/Tomcat/webapps/try_success/"
JkMount /try_success/*.jsp example

You should also make sure that Tomcat is started and is configured to listen on 8080 and 8009 under server.xml.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!