Loading...
 
B-Fabric http/https Redirect


Note

  • Glassfish http listens on port 8080
  • the B-Fabric application in Glasfish is accessed via the path /bfabric/
  • Glasfish uses several other ports for administration
    Using default port 4848 for Admin.
    Using default port 8080 for HTTP Instance.
    Using default port 7676 for JMS.
    Using default port 3700 for IIOP.
    Using default port 8181 for HTTP_SSL.
    Using default port 3820 for IIOP_SSL.
    Using default port 3920 for IIOP_MUTUALAUTH.
    Using default port 8686 for JMX_ADMIN.
    Using default port 6666 for OSGI_SHELL.

Apache

  • apache can be used as a reverse proxy, to redirect and as ssl-provider
  • it is not needed to use an apache server on the same host as the bfabric glassfish server

Reverse Proxy

  • apache modules needed: proxy, proxy_html, proxy_http
  • send the requests to port 80/443 to the glassfish application server
    <IfModule mod_proxy.c>
    # pass requests to bfabric backend
            ProxyPass /bfabric http://localhost:8080/bfabric
            ProxyPassReverse /bfabric http://localhost:8080/bfabric
    </IfModule>

Path Redirect

  • apache modues needed: alias and depending on your needs rewrite
  • redirect all requests to /bfabric/
    <IfModule mod_alias.c>
    # redirect all to /bfabric
            Redirect /      /bfabric/
    </IfModule>
  • redirect only empty requests to /bfabric/
    <IfModule mod_rewrite.c>
    # redirect only empty requests to bfabric
            RedirectMatch ^/$      /bfabric/
    </IfModule>

SSL Provider

  • use apache to provide secure connection to bfabric
  • apache modules needed: ssl
  • enable default ssl-site in apache, the redirect and reverse proxy will take care of the rest
  • create a personal certificate for your site and add it in the ssl-site configuration






Created by schmidt. Last Modification: Friday February 2, 2024 13:22:38 CET by tuerker.