Setup JBoss, ColdFusion, Apache on Linux/Mac

2009 August 30
tags: Development · Linux · Mac
by Josh Hand

> JBoss:

1. Download JBoss from http://www.jboss.org/jbossas/downloads/.
2. Unzip the downloaded file and put it somewhere convienient.
3. Remove the version (eg. change jboss-5.0.0.GA to jboss).
4. Create a log folder (jboss/server/default/log).
5. Delete the jboss/server/default/deploy/ROOT.war folder.
6. Open the jboss/bin folder and create the following three files (update paths).

start.sh

LOG_FILE=[PATH TO JBOSS FOLDER]/jboss/server/default/log/jboss.out
nohup [PATH TO JBOSS FOLDER]/jboss/bin/run.sh -b 0.0.0.0 >$LOG_FILE 2>$LOG_FILE &

stop.sh

[PATH TO JBOSS FOLDER]/jboss/bin/shutdown.sh -S

log.sh

tail -f --sleep-interval=.5
[PATH TO JBOSS FOLDER]/jboss/server/default/log/jboss.out


> ColdFusion:

1. Download ColdFusion 8 from Adobe and install using the J2EE WAR option (this will create a cfusion.war file in the directory of your choosing).
2. Unzip cfusion.war and you will have the CFIDE and WEB-INF folders.
3. Create a jboss/server/default/deploy/cfusion.war folder.
4. Copy the CFIDE and WEB-INF folders into the jboss/server/default/deploy/cfusion.war folder.
5. Open the jboss/server/default/deploy/cfusion.war/WEB-INF folder and create the following file:

jboss-web.xml

<jboss-web>
    <context-root>/</context-root>
</jboss-web>


> Apache:

1. Edit your apache config file (typically /etc/httpd/conf/httpd.conf).
2. Uncomment the following if its not already:

NameVirtualHost *:80

3. Create a virtual host based on the following (update details):

<VirtualHost *:80 >

    ServerName mysite.local
    ServerAlias mysite.local

    ProxyPass /CFIDE                http://127.0.0.1:8080/CFIDE
    ProxyPassReverse /CFIDE         http://127.0.0.1:8080/CFIDE

    ProxyPass /sitefolder           http://127.0.0.1:8080/sitefolder/
    ProxyPassReverse /sitefolder    http://127.0.0.1:8080/sitefolder/

    ProxyPass /                     http://127.0.0.1:8080/sitefolder/
    ProxyPassReverse /              http://127.0.0.1:8080/sitefolder/

    ProxyPreserveHost on

</VirtualHost>


> To start working:

1. Start Jboss:

[PATH TO JBOSS FOLDER]/jboss/bin/./start.sh

2. Start Apache:

service httpd start

3. Test site:

http://mysite.local

2 Responses leave one →
  1. Andrew
    Andrew PERMALINK
    Sep 11, 2009 at 5:31 PM

    Have you been able to refer to context/docbases outside of the exploded war? I have not been able to. This is easy on jrun4 and I see how people do this on jboss4. But I have not be able to do tihs on jboss5 and only see people failing to be able to refer to static paths outside the exploded war.

  1. Josh Hand
    Sep 17, 2009 at 5:43 PM

    @ Andrew: I haven't had the need to refer to contexts outside of the exploded war to date so can't comment on that unfortunately.

Leave a Reply