This may not be the most direct answer you're looking for, but after years of setting up a lot of Tomcat based infrastructure I always front-end them now with Apache and mod_ssl, using mod_jk (ajp13) to connect them. This is beneficial for many, many reasons:
- you can offload all static file processing to Apache for better performance
- you get access to all of the mod_rewrite (and other awesome modules) features
- setting up SSL w/Apache is a no brainer, Tomcat never even knows it's an SSL channel
...and on and on. While the java engine can handle SSL it's just not one of it's strong points in life and tends to be more of a hassle than what it's worth. Let java handle the webapps and their java code, let Apache do what it does best. You will also find that mod_jk has a lot of great options for making sure your app engine doesn't get overloaded; using the right combination of parameters you can have your users temporarily redirected in a clean, good looking manner when the Tomcat instances are not responding fast enough (or crash/lock up).
I got it working on my own. The answer were these commands:
.\run.bat -Djboss.service.binding.set=ports-01 -c ports-01
.\run.bat -Djboss.service.binding.set=ports-02 -c ports-02
Also, I had to copy the server/default to 2 new directories called server/ports-01 and server/ports-02 ...
Then , in the server\ports-01\conf\bindingservice.beans\META-INF I had to remove references to instances ports-02, ports-03, and "default" from it.
Then , in the server\ports-02\conf\bindingservice.beans\META-INF I had to remove references to instances ports-01, ports-03, and "default" from it.
Then, finally, I deleted the "standard", "web", and "default" directories from the default installation in the server directory.
Then, I ran both servers with the commands above, and out-of-the-box, they work.
Also, here is a batch file to run clustered instead of separate instances:
@echo off
start .\bin\run.bat -c ports-01 -g MyLocal -u 239.255.100.100 -b 127.0.0.1 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01
@echo Wait until first server finishes starting and then hit
@echo any key to start the second server in the cluster...
pause
start .\bin\run.bat -c ports-02 -g MyLocal -u 239.255.100.100 -b 127.0.0.1 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-02
Best Answer
You are probably after jboss-5.1.0.GA/server/standard/deploy/jbossweb.sar/server.xml
See
Don't forget that ports below 1024 are generally reserved, and can only be claimed by privileged users (root). Depending on your situation, it may be useful to put an apache reverse proxy in between.