This configuration is optimum for those wishing to use a Shared Hosting Environment with many Virtual Hosts. We run Redhat 8.0 and Redhat 9 servers and were able to get it working.
At first, I installed CFMX server with Tomcat as a J2EE setup (as recommended from Macromedia). Macromedia does have a good install `how to` page here, but running in a shared hosting environment, we quickly noticed it does not work very well. First off, it "hogs" Tomcat's memory, and continues to "hog" more memory for EACH shared hosting customer. Then we noticed that when we would add Datasources, they would not work for our hosting customers UNLESS we deleted their WEB-INF directory and re-installed it again (man, what a hassle!)
If you're like me, getting information from Macromedia support on this configuration is impossible, and the forums are not helpful neither (many people were in the same boat as us). So after many hours of trying to figure out how to get Tomcat running along with CFMX, we finally did it. Although this is for Linux configuration, it should work for Windows also (although I did not test it).
We got the JRun server (for ColdFusion) up and running to handle .cfm files and still use the Tomcat server to handle .jsp pages AND Servlets.
Here are the steps:
1) download CFMX 6.1 and start the setup process. Your file should look something like: "coldfusion-macr-linux.bin" (for Unix/Linux)
2) Once you get to "Install Configuration" select "Server configuration" continue...
3) Under "Configure Web Servers" choose "Add Web Server Configuration" to setup your Apache server configuration so that CFMX can make the proper shared object.
4) Then "Choose ColdFusion MX Administrator Location" and keep track of where you installed it. Then complete the installation process. Then start the coldfusion server as they say to.
5) Once finished, if all went well, everything should be working (Apache, Tomcat, & CFMX Server), but you'll notice that all your ".jsp" files and Servlets are being forwarded to CFMX server instead of Tomcat. This is what we will now fix.
6) Stop the CFMX server, then go into your CFMX install directory (default was: /opt/coldfusionmx) and look for this file:
| /opt/coldfusionmx/runtime/servers/default/SERVER-INF/default-web.xml |
Then rename that file to something like: "ORIG_default-web.xml" and put this modified xml file in place of the original.
7) Open up your httpd.conf file in Apache (/etc/httpd/conf/httpd.conf) and find this:
| # JRun Settings LoadModule jrun_module /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun20.so <IfModule mod_jrun20.c> JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore /opt/coldfusionmx/runtime/lib/wsconfig/1/jrunserver.store JRunConfig Bootstrap 127.0.0.1:51010 #JRunConfig Errorurl <optionally redirect to this URL on errors> AddHandler jrun-handler .jsp .cfm .cfml .cfc </IfModule> |
and modify the "AddHandler" variable by removing ".jsp" from it so it looks like this:
| # JRun Settings LoadModule jrun_module /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun20.so <IfModule mod_jrun20.c> JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false # for CFMX 7, change this to 'true' like this "JRunConfig Ignoresuffixmap true" JRunConfig Serverstore /opt/coldfusionmx/runtime/lib/wsconfig/1/jrunserver.store JRunConfig Bootstrap 127.0.0.1:51010 #JRunConfig Errorurl <optionally redirect to this URL on errors> AddHandler jrun-handler .cfm .cfml .cfc </IfModule> |
8) That's it. Restart Coldfusion, and Apache and now you should be able to start the coldfusion JRun Server, and only coldfusion pages will be served to it. Tomcat will get Servlets and .jsp files.
If this works good for you or you have a question, drop us an email (replace _AT_ with @ symbol) to let us know!
PerformanceHosting.net Tech Support Team
http://performancehosting.net