Skip to end of metadata
Go to start of metadata

For production environment, it's good to have a front end server like Apache.

While we present mod_jk and mod_proxy below, since 2012 we've been preferring using mod_proxy as it is simpler to configure and its performance improvements in the past few years have shown to be as fast (if not faster than the native java jk protocol).

So if you are to choose between the two, go with mod_proxy.

Using Apache 2.4 and mod_proxy

Add/enable the following to your httpd.conf:

LoadModule proxy_module modules/
LoadModule proxy_http_module modules/

Then on your virtual host config:

  ProxyRequests Off
  ProxyPreserveHost On
  <Proxy *>
     Require all granted
  ProxyPass /lams http://localhost:8080/lams
  ProxyPassReverse /lams http://localhost:8080/lams
  <Location /lams>
	Require all granted

Using Apache/IIS with LAMS (mod_jk)

If you want LAMS to coexist with another web server listening on port 80 on the same machine, and that web server is supported by the mod_jk connector, then you can use mod_jk to pass all requests from your web server through to lams.

See for the latest mod_jk binaries and documentation. outlines how to use mod_jk with jboss.


On the LAMS side, all you need to do is install LAMS normally, by default it will be listening on port 8009, which will be used by the mod_jk connector. If you've changed this behaviour, then it's probably safe to assume you know what you're doing already.


  1. Download the mod_jk .so (unix) or .dll (windows) file from, and place it in your Apache's modules directory.
  2. Add the module to your apache config. Update the paths as per your system.
      # Load mod_jk module
      # Update this path to match your modules location
      LoadModule    jk_module  modules/
      # Where to find
      # Update this path to match your conf directory location (put next to httpd.conf)
      JkWorkersFile /etc/httpd/conf/
      # Where to put jk shared memory
      # Update this path to match your local state directory or logs directory
      JkShmFile     /var/log/httpd/mod_jk.shm
      # Where to put jk logs
      # Update this path to match your logs directory location (put mod_jk.log next to access_log)
      JkLogFile     /var/log/httpd/mod_jk.log
      # Set the jk log level [debug/error/info]
      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)
      JkMount  /lams/* worker1
  3. Create a file in the location pointed to by JkWorkersFile directive above
      # Define 1 real worker using ajp13
      # Set properties for worker1 (ajp13)
  4. Restart apache.


  1. See The part with the steps you want to follow is under the heading 'Configuring the ISAPI redirector'.
  2. Use the file above.
  3. Use the following file.
  4. If using IIS6, also do the following (taken from
    • Open the ... Administrative Tools, Internet Information Services console.
    • In the tree on the left, click " Web Service Extensions"
    • In the right hand pane, click "Add a new Web Service Extension"
    • For the Extension Name, enter: Jakarta Tomcat
    • Click the "Add" button.
    • Browse and select C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\bin\isapi_redirector.dll
    • Click the "Allow" button. DO NOT MISS THIS STEP!
    • From the "Services" MMC, restart "IIS Admin"
  • No labels