0

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?

Decado
  • 1,949
  • 11
  • 17
user67856
  • 129
  • 1
  • 6
  • 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 06 '11 at 04: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 06 '11 at 05:11

1 Answers1

1

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
clmarquart
  • 456
  • 3
  • 5
  • 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 06 '11 at 04:47
  • Added an example above – clmarquart Apr 06 '11 at 05:00