Secure a GlassFish instance in a subdomain

Hello guys, How are you?
I'm trying to configure a server with a GlassFish instance in a different server from the root domain, for example:
The domain example.com.br is stored in a host like x.x.x.x with DNS capabilities. Additionally, I'm attempting to secure my GlassFish server in another instance with a subdomain, such as glassfihs.example.com.br, on a host y.y.y.y. I created a DNS record to point this domain to the GlassFish server host y.y.y.y. However, after requesting the certificate, I still have the 'Not Secure' message displayed in the navigator.
What is the reason for this?

Will I not be able to secure my GlassFish with a subdomain at a diferent ip address?

1 Like

You need to create a certificate that includes subdomains or use a wildcard certificate.

Specifically, you need to include example.com.br + www.example.com.br + glassfihs.example.com.br when issuing the certificate.

Or use a wildcard certificate with example.com.br + *.example.com.br to protect all subdomains.

Without the detailed error you see or the actual domain name it is impossible to be specific about why it would say "Not Secure"

In general, if you got a cert for glassfihs.example.com.br (spelled same as you did) then you can use that cert on any server you want. But, that server must be configured properly to use it.

If you would please provide your exact domain name we could be more helpful.

3 Likes

No, that is not necessary. Two different systems could get certs for just the domains they control. For example, server A could get a cert for example.com and www.example.com. Server B could get a cert just with glassfish.example.com in it.

4 Likes

(post deleted by author)

Yes, I didn't notice that these were two separate servers. I thought he wanted to run everything in a single configuration :frowning:

3 Likes

So @MikeMcQ, I think that's right because I have other subdomains in the server with nginx, and it works fine.
Probably, I'm doing something wrong when importing the certificate to GlassFish.
Today, I will do my best to solve this issue and post here the solution.
Thank you for your tips.