You can use the Apache Web server as the intermediary server. In this case, configure the Apache Web server as a reverse proxy that routes requests based on a set of rules and conditions. For this configuration, the Apache Web server uses the mod_rewrite and mod_proxy modules.
mod_rewrite is a URL rewriting module that performs modifications to the URL received by the Web server and creates a new request. These modifications are based on a set of rules and conditions that you also specify in the configuration file.
mod_proxy is a module that makes the Apache Web server the intermediary server. It transforms the response from the backend system and sends it back to the client so that it appears to have been sent from the Apache Web server. The backend system remains hidden.
This documentation provides only a brief description of the Apache configuration. For more information about configuring the Apache Web server as a reverse proxy, see the Apache Web server documentation.
The applications that are to be processed by the Apache Web server are deployed on the AS Java.
...
1. Copy any of the application’s files that are to be available to the client from its directory tree on the AS Java to the Apache Web server’s document root tree.
Do not copy the WEB-INF and meta-inf files to the Apache Web server’s directory tree. They contain specific information that does not need to be available to the client.
2. Edit the Apache Web server configuration file (httpd.conf):
...
a. Insert the mod_rewrite and mod_proxy modules in the Web server’s LoadModule and AddModule entries.
Example Configuration Entries
LoadModule
rewrite_module
modules/mod_rewrite.so
LoadModule
proxy_module
modules/libproxy.so
AddModule
mod_rewrite.c
AddModule
mod_proxy.c
RewriteLog
"/etc/httpd/logs/rewrite_log"
RewriteLogLevel
9
b. Using <Location> </Location>tags, specify the rules and conditions to use for the redirection. Use a separate <Location> section for each application that is to be redirected by the Apache Web server.
Example Redirection Rules
<Location /application_root_dir>
RewriteEngine On
RewriteCond
%{THE_REQUEST} \.jsp
RewriteRule ^(.+) http://somehost.com:90%{REQUEST_URI} [P]
RewriteCond
%{THE_REQUEST} Example
RewriteRule ^(.+) http://somehost.com:90%{REQUEST_URI} [P]
</Location>
The Apache Web server redirects the corresponding requests to the AS Java.