You are on page 1of 4

Configuring Apache with Jboss

This document will provide the steps for configuring Apache webserver with Jboss. The configuration
steps mentioned in this document is written for Jboss application server running on Windows XP and
Linux platforms. For other operating sstems! this ma var.
Steps for configuring Apache with Jboss:
". Apache Installation:
Windows:
#ownload the latest version of Apache Web $erver from the website
http://httpd.apache.org/download.cgi
%nstall the binar to some folder sa! C:\Progra !iles\Apache\".
#inu$:
#ownload the Apache webserver source from the website
http://httpd.apache.org/download.cgi.
&nce! the source had been downloaded! it needs to be extracted to some
folder sa /usr/local/Apache" using the command gun%ip &source %ip'.
This command will output a .tar file in the same folder.
'ntar the .tar file using the command tar ($)f &source tar'.
This creates a new director under the current director with the source
files.
(ow! we need to configure the source files. To achieve this! we will execute
a command called ./configure.
The next step is to build the source files. To build the source! execute the
following commands se)uentiall.
a*e
a*e install
&nce these two commands gets executed successfull! a director will be
created under /usr/local/apache+" and the Webserver config files and
would have been copied to this director.

*. Apache webserver and J+oss Application server needs an interface to interact between
themselves. The interface has been developed b Apache and is read for download from their
website http://tocat.apache.org/connectors,doc/.
,. od-.* Connector Installation:
Windows:
-lic. on the lin. to download the latest connector for Windows platform
mod/0.1".*.*21httpd1*.*.,.so. This download will be applicable onl for Win,*
platforms.
#inu$:
-lic. on the lin. to download the latest connector for Linux platform
mod/0.1".*.*21httpd1*.*.X.so . This download will be applicable onl for i324
processors.
5. 6ename the downloaded connector file to od-.*.so.
3. -op the od-.*.so file to C:\Progra !iles\Apache\odules folder in windows and
/usr/local/apache+/odules in linux.
4. -reate a file called wor*er.properties in the C:\Progra !iles\Apache\conf folder in
windows and /usr/local/apache+/conf in linux.
7. 'pdate the wor.er.properties file with the following lines
wor.ers.tomcat/home8/:\Jboss
wor.ers.0ava/home8C:\Progra !iles\Ja)a\J/01.2
ps3\ for windows and ps3/ for linux
wor.er.list8&4pro.ect'
wor.er.&4pro.ect'.tpe8a0p",
wor.er.&4pro.ect'.host8localhost
wor.er.&4pro.ect'.port8299:
Where
/:\Jboss 8 path where J+oss server is installed.
C:\Progra !iles\Ja)a\J/01.2 8 path where J#; is installed.
&4pro.ect' 3 an user defined name.
2. Append the below given lines at the end of an apache configuration file named httpd.conf
which will be available under the folder C:\Progra !iles\Apache\conf for windows and
/usr/local/apache+/conf for linux.
Load<odule 0./module modules=mod/0..so
J.Wor.ersFile conf=wor.er.properties
J.LogFile logs=mod/0..log
J.LogLevel error
J.6e)uestLogFormat >?w ?@ ?T>
J.<ount =A &4pro.ect' B<a.e sure that the value which ou assigned for
wor*er.list in the wor*er.properties is specified hereC.
:. Loo. out for the below given code in httpd.conf
D#irector =E
&ptions Follow$mLin.s
Allow&verride (one
&rder den! allow
#en from all
D=#irectorE
And change the last line /en4 fro all as Allow fro all. After update! it should loo. li.e the
one given below.
D#irector =E
&ptions Follow$mLin.s
Allow&verride (one
&rder den! allow
Allow from all
D=#irectorE
"9. The configuration change mentioned in $tep "" is a must! because! if not updated! all the
re)uests to access the resources of the J+oss server via the Apache server would return a
Forbidden error B59,C.
"". After ma.ing the configuration changes to the httpd.conf file! we can chec. whether the
entries which were added in $tep 2 and $tep : are correct. To do so! please follow the steps
given below.
Windows:
&pen up a command prompt and go to folder FC:\Progra
!iles\Apache\bin" and execute the following command
httpd.e$e (t
#inu$:
&pen up a terminal and change to the folder F/usr/local/apache+/binG and
execute the following command
./httpd ,t
%f it gives a message $ntax &;! then the content what we updated is correct. %f not! review
steps 2 and :.
"*. (ow! start the J+oss server and access the '6L http://localhost:5656. This would displa the
J+oss -onsole.
",. $tart the Apache server and access the '6L http://localhost. This would again! displa the
J+oss -onsole. %f not! then please redo the previous steps.
"5. (ow tr accessing an of the deploed applications in J+oss via Apache using the '6L
http://localhost/78application9
Where
78application9 8 an deploed application in Jboss.
%f the previous * steps are successful! then this step would render the page which ou
re)uested. %f it fails! redo the previous steps.

You might also like