在Windows Server 2008 R2上一起运行Tomcat 7和Apache 2.2.17的新手最无痛的方式是什么? 我希望Apache能够处理所有的静态内容,并且让Tomcat来处理这些烦人的工作。 到目前为止,两者都分开工作,只是将两者连接起来。
mod_jk仍然是这里的路? 这就是我的阅读指向我,但我不知道是否有一个更新/更容易的select。 如果是这样,如果我已经安装了DLL,那么我需要添加到我的Apacheconfiguration文件中?
mod_jk是要走的路。 mod_proxy可以工作,但JK更易于configuration,而且实现起来非常简单。 最快的介绍在这里: http : //tomcat.apache.org/connectors-doc/generic_howto/quick.html
编辑:
将以下内容添加到httpd.conf中(如果使用VirtualHosts ,则可以将部分放入单个主机中。
# 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