Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the httpd.conf located in the <httpd_home>\conf directory.
  2. Look for the following LoadModule directives and uncomment them by removing the # at the beginning of the line.
    Code Block
    
    LoadModule proxy_module modules/mod_proxy.so
    
    LoadModule proxy_http_module modules/mod_proxy_http.so
    
  3. At the bottom of the httpd.conf add the following lines to enable the re-rountingrouting.
    Code Block
    
    ProxyPass /console http://localhost:8080/console
    Image Removed
    
    ProxyPass /images http://localhost:8080/images
    Image Removed
    
    ProxyPassreverse / http://localhost:8080/
    Image Removed
    
    

You may need to add more ProxyPass directives depending on the requirements of your application. The last ProxyPassreverse directive captures the responses from the Geronimo server and masks the URL as it would be directly responded by the Apache HTTPd hiding the identity/location of the Geronimo server.

...

As the result of this configuration, when you point your browser to http://locahost/console, the request will be redirected to http://localhost:8080/console. This option allows to re-route URLs and ports.

Note: If you prefer to use mod_proxy_AJP rather than mod_proxy_http, you need to load proxy_ajp_module in httpd.conf and change the routing port to 8009(default) as followed:

Code Block

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
...
ProxyPass /console ajp://localhost:8009/console
ProxyPass /images ajp://localhost:8009/images
ProxyPassreverse / ajp://localhost:8009/