Apache mod_proxy and Pramati Server
Apache 2.0.44 and later versions have the built in redirector named “mod_proxy”, when configured, will redirect the request to the back-end Server. The back-end can be any Web Server, here we are talking specifically about Pramati Server. Apache server will be in front, taking all the HTTP request and will redirect these requests to Pramati Server based on the requested context. User will never feel that he got the response from Pramati Server, not from the Apache server. Lets us see how we can do this.
1) Stop the Apache server if running.
2) Navigate to the Apache installation, lets call it “APACHE_HOME”. For example, if your Apache is installed at “C:\Apache2.2″, then this is your “APACHE_HOME”
3) Locate the httpd.conf file under APACHE_HOME\conf directory and uncomment the following line:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
4) Add the following to the httpd.conf file located at APACHE_HOME\conf:
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /jspDeskWeb http://<host_name>:<port_name>/jspDeskWeb
ProxyPassReverse /jspDeskWeb http://<host_name>:<port_name>/jspDeskWeb
Where,
* “jspDeskWeb” : denotes the context root for which need the requests to be redirected to the back-end Pramati Server. You can provide your own application context root
* <host_name>:<port_name> : the host:http-port of Pramati Server on which the application is deployed.
5) You must replace the values of context root, IP and Port as per your Pramati Installation.
6) Start the Pramati Server now.
7) Save all the changes and restart Apache HTTP server. Now Apache is ready to redirect requests to Pramati Server which:
* Runs on host mentioned in ProxyPass URL
* Listens on http port number mentioned in ProxyPass URL
* And have the application deployed on it
Now Client will send the request as “http://<host_name_of_apache>/contextRoot/…..” and request will be served from Pramati Server.

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments
No comments yet.
Leave a comment