Posted: 12/18/2009 3:46:05 PM EDT
|
I'm a bit stumped.
I have two servlets running on one application server. One is running on Websphere App server 6.0 and the other on WAS 6.1. Both are on the same physical server and I have IBM HTTP server on a remote machine that can see the default port for each WAS profile. I need to configure a plugin file on this remote web server that is listening on port 80 and be able to route traffic to the two servlets via the plugin. So for instance I need to be able to use a url like this: http://remotewebserver/app1 and it route that to http;//remoteappserver:9080/app1 and the application be exposed to the port 80 request on the front of the web server. I need to be able to do that for two servlets that are listening on different ports. So app2 would look like this. http://remotewebserver1/app2 would route to http://remoteappserver:9081/app2. I took my plugin files for each application and copied the whole entry from <configure ...... content..... </configure for the second application and pasted it to the bottom of my plugin file for the first application and saved it. So the file has the entire entry for the remote server, the appserver node, the ports and the servlets all in there and then the second entry from <configure .... content for server2...servlet...</configure. I assume I'm doing this wrong because it's not working. What say you smart web guys? |
|
You need to enable the modules proxy, proxy_connect, and proxy_http on the front end machine.
Your proxy.conf would look something like ProxyRequests Off <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass /app1 http://remoteappserver:9080/app1 ProxyPassReverse /app1 http://remoteappserver:9080/app1 ProxyPass /app2 http://remoteappserver:9081/app2 ProxyPassReverse /app2 http://remoteappserver:9081/app2 |
|
Foxxz,
Thanks for replying. Humor me as I'm a little confused. I'm assuming that I need to enable the proxy modules in the httpd.conf file. But then I do not see a proxy.conf file in my HTTP server install. Here are the modules in the httpd.conf file I'm referring too. #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so I'm assuming I would not need the last one enabled as I don't need ftp enabled. Do I just create it with the entries you listed configured for my apps? Will http read it at startup like it does the httpd.conf file? I found a link on IBM's site about mapping multiple profiles to a single http server where it had you combine the entries from two plugin files. But after doing that my http service would not start. Thanks again. |