Reputation: 763
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
Upvotes: 0
Views: 334
Reputation: 6713
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.
Get a static IP address (e.g. 50.12.xxx.yy
)
Add an A (Host)
record: sub
--> 50.12.xxx.yy
Set the Grizzly BASE_URL: 50.12.xxx.yy
Go to http://sub.domain.com and you will hit your app
Upvotes: 1