You are on page 1of 13

Configuration / Integrating Tomcat and Apache Web server or Apache HTTP server on Windows

The version I used is

1. 2. 3. 4. 5.

Java version " !"!#$ "" Apache%!% Apache&tomcat&'!#! ' Tomcat&connectors& !%!%(&src!)ip Apache Tomcat Connectors !%!%( for WI*+%

P,ease fo,,ow the fo,,owing step to configure successfu,,-!!!

1)

Insta,,ing Apache

a. b. c.

.own,oad /apache$%!%! #&win+%&01'&openss,&#!2!1i!msi3 Just simp,e wi)ard fo,,ow ne0t button T-pe http4//,oca,host/ in browser

i. ii.

5ou wi,, get /it wor6s73 8ef 4

2)

Insta,,ing Tomcat

a. b. c.

.own,oad /apache&tomcat&'!#! '!)ip3 Just un)ip it 9oto T:;CAT$H:;</bin and run or doub,e c,ic6 startup!bat

i. d.

=or e0 4 C4>apache&tomcat&'!#! '>bin

T-pe http4//,oca,host41#1#/ in browser

i. ii.

5ou wi,, get 8ef4

3)

?top both servers now a! ?topping apache

i.

8ight c,ic6 apache service icon

ii! And c,ic6 /:pen Apache ;onitor3

iii. b.

C,ic6 ?top button!

?topping tomcat

i. 4)

Press /Ctr,@C3 in the tomcat conso,e

.own,oad /Tomcat&connectors& !%!%(&src!)ip3 and un)ip it!

a.

Cop- the fo,,owing fi,es from /C4>tomcat&connectors& !%!%(&src>conf3

i. ii. iii. b. 5)

uriwor6ermap!properties wor6ers!properties wor6ers!properties!minima,

Paste in here /C4>apache&tomcat&'!#! '>conf3

.own,oad /mod$A6& !%!%(&httpd&%!%! #!so3 from the fo,,owing path

a. b.

Path 4 http4//www!apache!org/dist/tomcat/tomcat&connectors/A6/binaries/win+%/A6& !%!%(/

8ef4

c. d. 6)

8ename from /mod$A6& !%!%(&httpd&%!%! #!so3 to /mod$A6!so3 Cop- /mod$A6!so3 and paste in here /C4>Program =i,es>Apache ?oftware =oundation>Apache%!%>modu,es3

Configure Apache

a. b.

:pen /httpd!conf3 from /C4>Program =oundation>Apache%!%>conf3

=i,es>Apache

?oftware

Add the fo,,owing code snippet at the end of the fi,e /httpd!conf3 ?oftware

Boad;odu,e A6$modu,e "C4/Program =i,es/Apache =oundation/Apache%!%/modu,es/mod$A6!so3 *ote& if option CbD didnDt wor6 then p,ease change it ,i6e be,ow and tr-! Boad;odu,e A6$modu,e modu,es/mod$A6!so

J6Wor6ers=i,e "C4/apache&tomcat&'!#! '/conf/wor6ers!properties" J6Bog=i,e "C4/apache&tomcat&'!#! '/conf/from$apache$mod$A6!,og" J6BogBeve, info

J6Bog?tamp=ormat "EFa Fb Fd FH4F;4F? F5G"

?end serv,et for conte0t /e0amp,es to wor6er named aAp +

J6;ount /e0amp,es aAp +

?end J?Ps for conte0t /e0amp,es/H to wor6er named aAp +

J6;ount /e0amp,es/H aAp +

7)

Configure Tomcat

a. b.

:pen /server!0m,3 from /C4>apache&tomcat&'!#! '>conf>server!0m,3 Add the fo,,owing inside /I?erverJ3 e,ement IBistener c,ass*ameK"org!apache!A6!config!ApacheConfig" modJ6K"C4/Program =i,es/Apache ?oftware =oundation/Apache%!%/modu,es/mod$A6!so" /J

c.

Add the fo,,owing between /IHostJ3 /I/HostJ3 IBistener c,ass*ameK"org!apache!A6!config!ApacheConfig" modJ6K"C4/Program =i,es/Apache ?oftware =oundation/Apache%!%/modu,es/mod$A6!so" /J

8) 9) 10)

?tart tomcat Wait sometime " or # seconds ?tart apache

a.

?tart apache i! 8ight c,ic6 apache service icon

ii! And c,ic6 /:pen Apache ;onitor3

iii.

C,ic6 ?tart button!

11) T-pe /http4//,oca,host/e0amp,es/3 a! 8ef4

b.

C,ic6 /?erv,ets e0amp,es3

If this above option and changes did not wo ! then p"ease do "i!e be"ow. 7)
Configure Apache

a. b.

:pen /httpd!conf3 from /C4>Program =oundation>Apache%!%>conf3

=i,es>Apache

?oftware

Add the fo,,owing code snippet at the end of the fi,e /httpd!conf3 Boad;odu,e A6$modu,e modu,es/mod$A6!so

J6Wor6ers=i,e "C4/apache&tomcat&'!#! '/conf/wor6ers!properties" J6Bog=i,e "C4/apache&tomcat&'!#! '/conf/from$apache$mod$A6!,og" J6BogBeve, info J6Bog?tamp=ormat "EFa Fb Fd FH4F;4F? F5G"

?end serv,et for conte0t /e0amp,es to wor6er named aAp +

J6;ount /e0amp,es aAp +

?end J?Ps for conte0t /e0amp,es/H to wor6er named aAp + J6;ount /e0amp,es/H aAp +

8)

Configure Tomcat

:pen /server!0m,3 /C4>apache&tomcat& '!#! '>conf>server!0m,3 Change the connection port!

a.

from

#$onnecto po t%&8009& enab"e'oo!(ps%&fa"se& edi ect)o t%&8443& p otoco"%&*+),1.3& ,*nd then sta t the apache and to.cat and t / it wi"" wo !.