Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Configure AJP13"

< Jetty‎ | Howto
(New page: ==Configuring AJP13 Using mod_jk or mod_proxy_ajp== The apache web server is frequently used as a server in front of a servlet container. While there are no real technical reasons to fron...)
 
m
Line 1: Line 1:
 
==Configuring AJP13 Using mod_jk or mod_proxy_ajp==
 
==Configuring AJP13 Using mod_jk or mod_proxy_ajp==
  
The apache web server is frequently used as a server in front of a servlet container. While there are no real technical reasons to front Jetty with Apache, you might choose to do so for software load balancing, to fit with a corporate infrastructure, or simply to stick with a known deployment structure.
+
The Apache web server is frequently used as a server in front of a servlet container. While there are no real technical reasons to front Jetty with Apache, you might choose to do so for software load balancing, to fit with a corporate infrastructure, or simply to stick with a known deployment structure.
  
 
There are three main ways to connect Apache to Jetty:
 
There are three main ways to connect Apache to Jetty:
  
# Using apache [http://httpd.apache.org/docs/2.2/mod/mod_proxy.html mod_proxy] and a normal Jetty HTTP connector.
+
# Using Apache [http://httpd.apache.org/docs/2.2/mod/mod_proxy.html mod_proxy] and a normal Jetty HTTP connector.
# Using apache [http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html mod_proxy_ajp] and the Jetty AJP connector.
+
# Using Apache [http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html mod_proxy_ajp] and the Jetty AJP connector.
# Using apache [http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html mod_jk] and the Jetty AJP connector.
+
# Using Apache [http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html mod_jk] and the Jetty AJP connector.
  
Using the HTTP Connectors is greatly preferred for the following reasons:
+
We recommend using the HTTP connectors for the following reasons:
* Jetty performs significantly better with HTTP
+
* Jetty performs significantly better with HTTP.
 
* The AJP protocol is poorly documented and has many version irregularities.  
 
* The AJP protocol is poorly documented and has many version irregularities.  
If you must use AJP, the  mod_proxy_ajp module is preferred over mod_jk. Previously, the load balancing capabilities of mod_jk meant that you had to use (tolerate) it, but with Apache 2.2, [http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html mod_proxy_balancer] is available and works over HTTP and AJP connectors.
+
If you must use AJP, the  mod_proxy_ajp module is better than mod_jk. Previously, the load balancing capabilities of mod_jk meant that you had to use (tolerate) it, but with Apache 2.2, [http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html mod_proxy_balancer] is available and works over HTTP and AJP connectors.
  
 
== Using HTTP ==
 
== Using HTTP ==
  
<font color="red">'''THIS IS THE RECOMMENDED MECHANISM TO CONNECT APACHE AND JETTY'''</font>
+
<font color="red">'''We recommend this mechanism to connect Apache and Jetty.'''</font>
  
To configure Apache to use mod_proxy, mod_proxy_http and/or mod_proxy_balancer with HTTP see<br />[/display/JETTY/Configuring+mod_proxy Configuring mod_proxy].
+
To configure Apache to use mod_proxy, mod_proxy_http and/or mod_proxy_balancer with HTTP, see [[JETTY/Howto/Configure_mod_proxy|Configuring mod_proxy]].
  
 
=Using AJP=
 
=Using AJP=
  
<font color="red">'''AJP is NOT recommended. Use HTTP and mod_proxy instead (see above)'''</font>
+
<font color="red">'''We do NOT recommend AJP. Use HTTP and mod_proxy instead (see above).'''</font>
  
<blockquote>
+
We do not recommend AJP for these reasons:
  
AJP is not recommended for a number of reasons:
+
* Historically mod_jk has had intermittent maintenance and bad versioning practices. This make it difficult to select a known, good version that is fully compatible with the AJP connector you are running.
 
+
* Historically mod_jk has had intermittent maintenance and bad versioning practises. This make it difficult to select a known good version that is fully compatible with the AJP connector you are running.
+
 
* The mod_proxy plugin is more actively maintained and the mod_proxy_balancer supports a richer set of options for load balancing.
 
* The mod_proxy plugin is more actively maintained and the mod_proxy_balancer supports a richer set of options for load balancing.
* Jetty is optimized to deal with the text based HTTP protocol and the servlet API also exposes the text nature of HTTP to the application. There are no measurable benefits of using apache to convert text HTTP to the binary AJP protocol, only for jetty to have to convert back. Some tests have shown 15% more throughput with mod_proxy than with mod_ajp
+
* Jetty is optimized to deal with the text-based HTTP protocol, and the servlet API also exposes the text nature of HTTP to the application. There are no measurable benefits for using Apache to convert text HTTP to the binary AJP protocol, only for Jetty to have to convert back. Some tests have shown 15% more throughput with mod_proxy than with mod_ajp.
* With cometd style applications, neither mod_jk nor mod_proxy scale well. However, mod_proxy does make greater use of connections, so it is a better choice for moderate comet load. For full comet scaling, either jetty should be directly exposed to the internet or an async load balancer like nginx should be used.
+
* With cometd style applications, neither mod_jk nor mod_proxy scale well. However, mod_proxy does make greater use of connections, so it is a better choice for moderate comet load. For full comet scaling, you should either directly expose Jetty to the Internet, or use an async load balancer like Nginx.
* Note however that AJP is still full supported by the jetty team and we will strive to fix any issues found.
+
  
</blockquote>
+
Note however that the Jetty team still supports AJP, and we will strive to fix any issues found.
  
 
==The Jetty AJP Connector ==
 
==The Jetty AJP Connector ==
  
To use AJP with either mod_jk or mod_proxy_ajp, you need to configure Jetty with an AJP13 connector. This can configured by adding etc/jetty-ajp.xml to the command line. Alternately and existing jetty.xml file may be modified with:
+
To use AJP with either mod_jk or mod_proxy_ajp, you need to configure Jetty with an AJP13 connector. You can do so by adding etc/jetty-ajp.xml to the command line. You can also modify an existing jetty.xml file with:
 
+
<div class="code panel" style="border-width: 1px"><div class="codeContent panelContent">
+
  
 +
<source lang="xml">
 
   
 
   
 
  <Call name=<span class="code-quote">"addConnector"</span>>
 
  <Call name=<span class="code-quote">"addConnector"</span>>
 
   <Arg>
 
   <Arg>
     <New class=<span class="code-quote">"org.mortbay.jetty.ajp.Ajp13SocketConnector"</span>>
+
     <New class=<span class="code-quote">"org.eclipse.jetty.ajp.Ajp13SocketConnector"</span>>
 
       <Set name=<span class="code-quote">"port"</span>>8009</Set>
 
       <Set name=<span class="code-quote">"port"</span>>8009</Set>
 
     </New>
 
     </New>
Line 51: Line 47:
 
  </Call>
 
  </Call>
  
</div></div>
+
</source>
  
The full options for the Ajp13SocketConnector are available in the [http://jetty.mortbay.org/apidocs/org/mortbay/jetty/ajp/Ajp13SocketConnector.html javadoc].
+
The full options for the Ajp13SocketConnector are available in the [http://download.eclipse.org/jetty/stable-7/apidocs/index.html?org/eclipse/jetty/ajp/Ajp13SocketConnector.html javadoc].
  
 
==mod_proxy_ajp==
 
==mod_proxy_ajp==
  
With apache 2.2 [http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html mod_proxy_ajp] is an extension of the [http://httpd.apache.org/docs/2.2/mod/mod_proxy.html mod_proxy] module and may also be used in conjunction with the [http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html mod_proxy_balancer] module. Prior to 2.2, mod_proxy did not support AJP.
+
With Apache 2.2 [http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html mod_proxy_ajp] is an extension of the [http://httpd.apache.org/docs/2.2/mod/mod_proxy.html mod_proxy] module, and works in conjunction with the [http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html mod_proxy_balancer] module. Prior to 2.2, mod_proxy did not support AJP.
  
 
===Compatibility===
 
===Compatibility===
  
<div class="table-wrap">
+
{| class="wikitable"
  
{| class="confluenceTable"
 
! class="confluenceTh" | Apache
 
! class="confluenceTh" | Win32
 
! class="confluenceTh" | Linux(ubuntu)
 
 
|-
 
|-
| class="confluenceTd" | Apache 1.3
+
! scope=col width ="75" | Apache
| class="confluenceTd" | no mod_proxy_ajp bundled
+
! scope=col width ="75" | Win32
| class="confluenceTd" | no mod_proxy_ajp bundled
+
! scope=col width ="75" | Linux (Ubuntu)
 
|-
 
|-
| class="confluenceTd" | Apache 2.0 (2.0.59)
+
| Apache 1.3
| class="confluenceTd" | no mod_proxy_ajp bundled <br class="atl-forced-newline" />
+
| no mod_proxy_ajp bundled
| class="confluenceTd" | no mod_proxy_ajp bundled
+
| no mod_proxy_ajp bundled
 
|-
 
|-
| class="confluenceTd" | Apache 2.2
+
| Apache 2.0 (2.0.59)
| class="confluenceTd" |
+
| no mod_proxy_ajp bundled <br class="atl-forced-newline" />
 +
| no mod_proxy_ajp bundled
 +
|-
 +
| Apache 2.2
 +
|  
 
[[Image:check.gif]]
 
[[Image:check.gif]]
| class="confluenceTd" |
+
|  
 
[[Image:check.gif]]
 
[[Image:check.gif]]
 +
|
 
|}
 
|}
 
</div>
 
  
 
===Configuration===
 
===Configuration===
  
The configuration of mod_proxy_ajp is identical to the [/display/JETTY/Configuring+mod_proxy Configuration of mod_proxy], except that <tt>ajp://</tt> may be used as a protocol instead of <tt>http://</tt> when specifying destinations (workers) in <tt>ProxyPass</tt> and <tt>BalancerMember</tt> elements.
+
The configuration of mod_proxy_ajp is identical to the [[JETTY/Howto_Configure_mod_proxy configuration of mod_proxy], except that you can use <tt>ajp://</tt> as a protocol instead of <tt>http://</tt> when specifying destinations (workers) in <tt>ProxyPass</tt> and <tt>BalancerMember</tt> elements.
  
Apache 2.2 normally bundles mod_proxy, mod_proxy_ajp and mod_proxy_balancer, so they often do not need to be installed separately. If they are separately bundled by your operation system (eg as RPMs or debians) ensure that they are installed.
+
Apache 2.2 normally bundles mod_proxy, mod_proxy_ajp and mod_proxy_balancer, so often you do not need to install them separately. If they are separately bundled by your operating system (for example, as RPMs or Debians), ensure that they are installed.
  
The apache configuration structure can vary greatly with operating system distros and there may be some template configurations for mod_proxy. If not, add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory <br class="atl-forced-newline" />
+
The Apache configuration structure can vary greatly with operating system distros, and there might be some template configurations for mod_proxy. If not, add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory:
  
<div class="code panel" style="border-width: 1px"><div class="codeContent panelContent">
+
<source lang="text">
  
<nowiki>
 
 
  LoadModule proxy_module modules/mod_proxy.so
 
  LoadModule proxy_module modules/mod_proxy.so
 
  LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
 
  LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
Line 113: Line 107:
 
  </span></Proxy>
 
  </span></Proxy>
  
</div></div>
+
</source>
  
<br class="atl-forced-newline" /> Where: <br class="atl-forced-newline" /><br class="atl-forced-newline" /><br class="atl-forced-newline" />
+
Where:  
  
* '''LoadModule''' - tells your apache server to load a module library and where it is located.
+
* ''LoadModule''–tells your Apache server to load a module library, and shows where it is located.
* '''ProxyPreserveHost On''' - keeps the original Host Header. '''THIS IS HIGHLY RECOMMENDED FOR ALL PROXY CONFIGURATIONS'''
+
* ''ProxyPreserveHost On''–keeps the original Host Header. '''WE HIGHLY RECOMMENDED THIS FOR ALL PROXY CONFIGURATIONS.'''
* '''ProxyPass''' - Maps a path to a proxied destination. The destination may be a <tt>http://</tt> or <tt>ajp://</tt> URL to directly map to a single server, or it may be a <tt>balancer://</tt> URL to map to a cluster.
+
* ''ProxyPass''–Maps a path to a proxied destination. The destination might be a <tt>http://</tt> or <tt>ajp://</tt> URL to directly map to a single server, or it might be a <tt>balancer://</tt> URL to map to a cluster.
* '''Proxy balancer://''' - defines the nodes (workers) in the cluster. Each member may be a {http://}} or <tt>ajp://</tt> URL or another <tt>balancer://</tt> URL for cascaded load balancing configuration.
+
* '''Proxy balancer://''–defines the nodes (workers) in the cluster. Each member might be a {http://}} or <tt>ajp://</tt> URL or another <tt>balancer://</tt> URL for a cascaded load balancing configuration.
  
 
==mod_jk==
 
==mod_jk==
  
'''It is NOT recommended to use mod_jk'''
+
<font color="red"> '''We do NOT recommend using mod_jk.'''
  
 
===Compatibility===
 
===Compatibility===
Line 168: Line 162:
 
|  
 
|  
 
| mod_jk-1.2.14
 
| mod_jk-1.2.14
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|-
 
|-
 
|  
 
|  
 
| mod_jk-1.2.15
 
| mod_jk-1.2.15
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|-
 
|-
 
|  
 
|  
 
| mod_jk-1.2.18
 
| mod_jk-1.2.18
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|-
 
|-
 
|  
 
|  
 
| mod_jk-1.2.19
 
| mod_jk-1.2.19
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|-
 
|-
Line 203: Line 197:
 
|  
 
|  
 
| mod_jk-1.2.18
 
| mod_jk-1.2.18
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|-
 
|-
 
|  
 
|  
 
| mod_jk-1.2.19
 
| mod_jk-1.2.19
[[Image:check.gif]]
+
| [[Image:check.gif]]
 
|  
 
|  
 
|}
 
|}
 
 
  
 
===Configuring Apache HTTPD Server with mod_jk===
 
===Configuring Apache HTTPD Server with mod_jk===
Line 219: Line 211:
  
 
# Put mod_jk.so into your <apache-root>/modules/ directory.
 
# Put mod_jk.so into your <apache-root>/modules/ directory.
# Download mod_jk.so here: http://www.opensourcecommunity.ph/apache/tomcat/tomcat-connectors/jk/binaries/
+
# Download mod_jk.so here: http://www.fightrice.com/mirrors/apache//tomcat/tomcat-connectors/jk/binaries/
 
# Add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory.  
 
# Add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory.  
  
Line 248: Line 240:
 
* ''JkWorkersFile conf/worker.properties'' tells mod_jk where your worker.properties is located.
 
* ''JkWorkersFile conf/worker.properties'' tells mod_jk where your worker.properties is located.
 
* ''JkLogFile logs/mod_jk.log'' tells mod_jk where to write mod_jk related Logs.
 
* ''JkLogFile logs/mod_jk.log'' tells mod_jk where to write mod_jk related Logs.
# After adding the mod_jk configuration you can add a ''VirtualHost'' entry in the same file (httpd.conf) as long as its located below your mod_jk configuration entry:  
+
# After adding the mod_jk configuration you can add a ''VirtualHost'' entry in the same file (httpd.conf) as long as it is located below your mod_jk configuration entry:  
  
 
<source lang="text">
 
<source lang="text">

Revision as of 17:11, 22 April 2011

Configuring AJP13 Using mod_jk or mod_proxy_ajp

The Apache web server is frequently used as a server in front of a servlet container. While there are no real technical reasons to front Jetty with Apache, you might choose to do so for software load balancing, to fit with a corporate infrastructure, or simply to stick with a known deployment structure.

There are three main ways to connect Apache to Jetty:

  1. Using Apache mod_proxy and a normal Jetty HTTP connector.
  2. Using Apache mod_proxy_ajp and the Jetty AJP connector.
  3. Using Apache mod_jk and the Jetty AJP connector.

We recommend using the HTTP connectors for the following reasons:

  • Jetty performs significantly better with HTTP.
  • The AJP protocol is poorly documented and has many version irregularities.

If you must use AJP, the mod_proxy_ajp module is better than mod_jk. Previously, the load balancing capabilities of mod_jk meant that you had to use (tolerate) it, but with Apache 2.2, mod_proxy_balancer is available and works over HTTP and AJP connectors.

Using HTTP

We recommend this mechanism to connect Apache and Jetty.

To configure Apache to use mod_proxy, mod_proxy_http and/or mod_proxy_balancer with HTTP, see Configuring mod_proxy.

Using AJP

We do NOT recommend AJP. Use HTTP and mod_proxy instead (see above).

We do not recommend AJP for these reasons:

  • Historically mod_jk has had intermittent maintenance and bad versioning practices. This make it difficult to select a known, good version that is fully compatible with the AJP connector you are running.
  • The mod_proxy plugin is more actively maintained and the mod_proxy_balancer supports a richer set of options for load balancing.
  • Jetty is optimized to deal with the text-based HTTP protocol, and the servlet API also exposes the text nature of HTTP to the application. There are no measurable benefits for using Apache to convert text HTTP to the binary AJP protocol, only for Jetty to have to convert back. Some tests have shown 15% more throughput with mod_proxy than with mod_ajp.
  • With cometd style applications, neither mod_jk nor mod_proxy scale well. However, mod_proxy does make greater use of connections, so it is a better choice for moderate comet load. For full comet scaling, you should either directly expose Jetty to the Internet, or use an async load balancer like Nginx.

Note however that the Jetty team still supports AJP, and we will strive to fix any issues found.

The Jetty AJP Connector

To use AJP with either mod_jk or mod_proxy_ajp, you need to configure Jetty with an AJP13 connector. You can do so by adding etc/jetty-ajp.xml to the command line. You can also modify an existing jetty.xml file with:

 
 <Call name=<span class="code-quote">"addConnector"</span>>
   <Arg>
     <New class=<span class="code-quote">"org.eclipse.jetty.ajp.Ajp13SocketConnector"</span>>
       <Set name=<span class="code-quote">"port"</span>>8009</Set>
     </New>
   </Arg>
 </Call>

The full options for the Ajp13SocketConnector are available in the javadoc.

mod_proxy_ajp

With Apache 2.2 mod_proxy_ajp is an extension of the mod_proxy module, and works in conjunction with the mod_proxy_balancer module. Prior to 2.2, mod_proxy did not support AJP.

Compatibility

Apache Win32 Linux (Ubuntu)
Apache 1.3 no mod_proxy_ajp bundled no mod_proxy_ajp bundled
Apache 2.0 (2.0.59) no mod_proxy_ajp bundled
no mod_proxy_ajp bundled
Apache 2.2

Check.gif

Check.gif

Configuration

The configuration of mod_proxy_ajp is identical to the [[JETTY/Howto_Configure_mod_proxy configuration of mod_proxy], except that you can use ajp:// as a protocol instead of http:// when specifying destinations (workers) in ProxyPass and BalancerMember elements.

Apache 2.2 normally bundles mod_proxy, mod_proxy_ajp and mod_proxy_balancer, so often you do not need to install them separately. If they are separately bundled by your operating system (for example, as RPMs or Debians), ensure that they are installed.

The Apache configuration structure can vary greatly with operating system distros, and there might be some template configurations for mod_proxy. If not, add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory:

 LoadModule proxy_module modules/mod_proxy.so
 LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
 LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
 
 # always keep the host header
 ProxyPreserveHost On
 
 # map to cluster
 ProxyPass /test balancer:</nowiki><span class="code-comment">//my_cluster/test stickysession=JSESSIONID nofailover=On
 </span>ProxyPass /demo balancer:<span class="code-comment">//my_cluster/demo stickysession=JSESSIONID nofailover=On
 </span><nowiki>
 # define the balancer, with http and/ or ajp connections
 <Proxy balancer:</nowiki><span class="code-comment">//my_cluster>
 </span>    BalancerMember ajp:<span class="code-comment">//yourjettyhost1:8009
 </span>    BalancerMember ajp:<span class="code-comment">//yourjettyhost2:8009
 </span></Proxy>

Where:

  • LoadModule–tells your Apache server to load a module library, and shows where it is located.
  • ProxyPreserveHost On–keeps the original Host Header. WE HIGHLY RECOMMENDED THIS FOR ALL PROXY CONFIGURATIONS.
  • ProxyPass–Maps a path to a proxied destination. The destination might be a http:// or ajp:// URL to directly map to a single server, or it might be a balancer:// URL to map to a cluster.
  • 'Proxy balancer://–defines the nodes (workers) in the cluster. Each member might be a {http://}} or ajp:// URL or another balancer:// URL for a cascaded load balancing configuration.

mod_jk

We do NOT recommend using mod_jk.

Compatibility

Apache mod_jk Win32 Linux (Ubuntu)
Apache 1.3 No HTTPD Binary Available
mod_jk-1.2.14 Not yet tested
mod_jk-1.2.15 Not yet tested
mod_jk-1.2.18 Not yet tested
mod_jk-1.2.19 Not yet tested
Apache 2.0 (2.0.59)
mod_jk-1.2.14 Check.gif
mod_jk-1.2.15 Check.gif
mod_jk-1.2.18 Check.gif
mod_jk-1.2.19 Check.gif
Apache 2.2
mod_jk-1.2.14 No Binary Available
mod_jk-1.2.15 No Binary Available
mod_jk-1.2.18 Check.gif
mod_jk-1.2.19 Check.gif

Configuring Apache HTTPD Server with mod_jk

To configure an Apache HTTPD server with mod_jk:

  1. Put mod_jk.so into your <apache-root>/modules/ directory.
  2. Download mod_jk.so here: http://www.fightrice.com/mirrors/apache//tomcat/tomcat-connectors/jk/binaries/
  3. Add the entry below in your httpd.conf apache configuration file located in <apache-root>/conf/ directory.
 
 <IfModule !mod_jk.c>
 
  	LoadModule jk_module  modules/mod_jk.so
 
 </IfModule>
 
 <IfModule mod_jk.c>
 
  	JkWorkersFile <span class="code-quote">"conf/worker.properties"</span>
 
  	JkLogFile <span class="code-quote">"logs/mod_jk.log"</span>
 
  	JkLogLevel info
 
  	JkLogStampFormat <span class="code-quote">"[%a %b %d %H:%M:%S %Y] "</span>
 
  	JkOptions +ForwardKeySize +ForwardURICompat
 
 </IfModule>

Where:

  • LoadModule jk_module modules/mod_jk.so tells your Apache server to load the mod_jk libray and where to find it.
  • JkWorkersFile conf/worker.properties tells mod_jk where your worker.properties is located.
  • JkLogFile logs/mod_jk.log tells mod_jk where to write mod_jk related Logs.
  1. After adding the mod_jk configuration you can add a VirtualHost entry in the same file (httpd.conf) as long as it is located below your mod_jk configuration entry:
 <VirtualHost host:*>
 
 	ServerName yourserver
 
 
  	ServerAdmin user@yourserver
 
  	## You can add further entries concerning log-files, log-level, URL-rewriting, ...
 
  	## Pass requests through to jetty worker
 
  	JkMount /* jetty
 
 </VirtualHost>
  1. Add a worker file worker.properties in your <apache-root>/conf/.
  2. Add the entries below, and make sure to specify your IP address or hostname in worker.jetty.host property entry to where your jetty application is runnning.
 
 worker.list=jetty
 
 worker.jetty.port=8009
 
 worker.jetty.host=<server name or ip where your jetty will be running>
 
 worker.jetty.type=ajp13
 
 worker.jetty.lbfactor=1

Back to the top