Question

I have a subdomain. I want attach it to Java JAX-RS project with grizzly server implementation. When i set up on localhost:8080 it works well, but i can't figure out, how can i set up it with my subdomain or domain.

Thanks

Was it helpful?

Solution

TLDR; You need a static IP address.

You should not set the grizzly BASE_URL to the subdomain and you should not use a CNAME record. You should set the BASE_URL to a static IP address, and point the subdomain to that IP using an A record.

Example: you own domain.com and want to attach sub.domain.com to your application.

  1. Get a static IP address (e.g. 50.12.xxx.yy)

  2. Add an A (Host) record: sub --> 50.12.xxx.yy

  3. Set the Grizzly BASE_URL: 50.12.xxx.yy

  4. Go to http://sub.domain.com and you will hit your app

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top