Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the most painless way for a newbie to get Tomcat 7 and Apache 2.2.17 running together on Windows Server 2008 R2? I want Apache to handle all the static content and for Tomcat to handle the grunt work. So far both work separately, just working on connecting the two.

Is mod_jk still the way to go here? That's what my reading points me to, but I'm not sure if there's a newer/easier alternative. If so, what do I need to add to my Apache config file if I've already got the DLL installed?

share|improve this question
    
Found mod_proxy_ajp and it looks like it's easier to setup. Is this the "wave of the future"? Not looking for spectacular performance, just something that's reliable and easy to set up. Thanks in advance for thoughts. –  user67856 Apr 6 '11 at 4:43
    
mod_proxy_ajp is a little easier to set up than mod_jk. However be very aware about the "secure your proxy" warning in the documentation –  Decado Apr 6 '11 at 5:11

1 Answer 1

up vote 1 down vote accepted

mod_jk is the way to go. mod_proxy works as well, but JK is more configurable, plus it's very straight-forward to implement. The quickest intro is here: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html

Edit:

Add the following to httpd.conf (if you're using VirtualHosts you can put portions in individual hosts.

# Load mod_jk module
# Update this path to match your modules location
LoadModule    jk_module  modules/mod_jk.so

# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to     httpd.conf)
JkWorkersFile conf/workers.properties

# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
# This can be commented out, to disable logging
JkLogFile     logs/mod_jk.log

# Set the jk log level [debug/error/info]
# Only matters if JkLogFile is being used.
JkLogLevel    info

# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# Send everything for context /examples to worker named worker1 (ajp13)
# /examples would most likely be the name of your WebApp (c:/tomcat/webapps/example)
JkMount  /examples/* worker1
share|improve this answer
    
Thanks for your input. I've been looking at that page, and I get down to the Apache config example, but it seems to favor UNIX. Would you mind posting an example of a minimum config for a Windows server? Thanks again. –  user67856 Apr 6 '11 at 4:47
    
Added an example above –  clmarquart Apr 6 '11 at 5:00
    
Thanks for your insights! –  user67856 Apr 6 '11 at 17:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.