0% found this document useful (0 votes)
18 views

Apache configuration mod_proxy

This document provides a step-by-step guide for configuring Apache to route HTTP requests to JBoss using mod_proxy. It includes prerequisites, enabling necessary modules, setting up non-load-balancing and load-balancing proxies, enabling sticky sessions, and restarting the web server. Additionally, it outlines commands for installing WebSphere components and managing profiles and servers.

Uploaded by

j. koteswarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Apache configuration mod_proxy

This document provides a step-by-step guide for configuring Apache to route HTTP requests to JBoss using mod_proxy. It includes prerequisites, enabling necessary modules, setting up non-load-balancing and load-balancing proxies, enabling sticky sessions, and restarting the web server. Additionally, it outlines commands for installing WebSphere components and managing profiles and servers.

Uploaded by

j. koteswarao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Configuring Apache to JBoss HTTP Request Routing Using Mod_Proxy::

Prerequisites:
1) Apache HTTP server either from JBoss Enterprise Web Server or provided by operating
system needs to be installed
2) The mod_proxy modules need to be installed. Apache HTTP server typically comes with
the mod_proxy modules already included
3) You need root or administrator privileges to modify the Apache HTTP Server configuration.

STEP1: Enable the mod_proxy modules in the httpd.conf:


Look for the following lines in your HTTPD_CONF/httpd.conf file. If they are not present, add
them to the bottom. If they are present but the lines begin with a comment (#) character, remove
the character. Save the file afterward.

LoadModule proxy_module modules/mod_proxy.so


LoadModule proxy_http_module modules/mod_proxy_http.so
# LoadModule proxy_balancer_module modules/mod_proxy_balancer.so( If it is domain enable it )
# Uncomment these to proxy FTP or HTTPS
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so

Step2: Add a non-load-balancing proxy:


Add the following configuration to your HTTPD_CONF/httpd.conf file, directly beneath any
other <VirtualHost> directives you may have. Replace the values with ones appropriate to
your setup.

<virtualHost localhost:7007>
ProxyPreserveHost On
ProxyPass /sample http://localhost:8080/sample
ProxyPassReverse /sample http://localhost:8080/sample
</virtualHost >

After making your changes, save the file

Step3: Add a load-balancing proxy:


Make sure to uncomment the following one.

@ LoadModule proxy_module modules/mod_proxy.so


@ Loadmodule proxy_balancer_module modules/mod_proxy_balancer.so
@ LoadModule proxy_http_module modules/mod_proxy_http.so
@ Loadmodule ibmethod_byrequests_module modules/mod_ibmethod_byrequests.so

<Proxy balancer://cluster>

# Add each JBoss Enterprise Application Server by IP address and port.


# If the route values are unique like this, one node will not fail over to the other.

BalancerMember http://192.168.126.131:8080/SampleWebApp/ route=node1


BalancerMember http://localhost:8080/SampleWebApp/ route=node2

</Proxy>

<VirtualHost *:7007>
# Your domain name
ServerName YOUR_DOMAIN_NAME

ProxyPreserveHost On
ProxyPass /SampleWebApp balancer://cluster/SampleWebApp/ stickysession=JSESSIONID

Step4: Enable Sticky session:


Sticky sessions mean that if a client request originally goes to a specific JBoss worker, all future
requests will be sent to the same worker, unless it becomes unavailable. This is almost always
the correct behavior.

Step5: Restart the web server:

Restart the web server for your changes to take effect.

Websphere
IM

./imcl install package id -repositories path of repository.config -installationDirectory /opt/IM -


acceptLicense -sP or svP( showProgress)

WAS

./imcl install package id -repositories path of repository.config -acceptLicense -showProgress

Plugins

./imcl install package id -repositories path of repository.config -acceptLicense -showProgress

IHS

./imcl install package id -repositories path of repository.config -properties user.ihs.httpPort=80 -


acceptLicense -showProgress

Profile creation

./manageprofiles.sh -create -profileName Appsrv01 -profilePath path of Appsrv01 - templatepath path


of default -nodeName App_node01 -hostName localhost -cellName mycell01

./manageprofiles.sh -create -profileName Dmgr01 -profilePath path of Dmgr01 - templatepath path of


dmgr -nodeName Dmgr_node01 -hostName localhost -cellName Dmgrcell01

./manageprofiles.sh -create -profileName custom01 -profilePath path of custom01 - templatepath path


of managed -nodeName custom_node01 -hostName localhost -cellName customcell01

App server

./startServer.sh -all

./startServer.sh server name of the server

Dmgr

./startmanager.sh

./stopmanager.sh

Access logs :

/opt/ibm/httpserver/logs

How to start Node agent


./startNode.sh
./stopNode.sh

You might also like