With Glassfish, how to resolve https URL to http URL


GlassFish 3.0.1 RHEL 6.5 MySQL 5.4

Hello all

I have a web app running under GlassFish/RHEL/MySQL where all of the software tiers (GlassFish/RHEL/MySQL) are on the same system. I have a (separate) DNS server which maps mycompany.myserver.org to I can resolve the server name with nslookup successfully so DNS is working. I can access the web app internally by using

However, I want to use SSL and I want to access my app (internally) via https://mycompany.myserver.org/myapp/p=101.

How does one do this using GlassFish? In other words, how does one "map" https://mycompany.myserver.org/myapp/p=101 and redirect/resolve it to

Many thanks …

Best Answer

You can add a https listener to glassfish either by using the admin console or by editing the domain.xml.

If you afterwards disable the http listener you can only access by https.

A redirect or proxy is not needed.

Please note that you can use port 443 (the default port for https) only if you run glassfish as root.