I have a spring boot application. Usually I run my Spring applications on PaaS instances, and configuring a domain name from there is easy enough, however I am running this on a Virtual Private Server, and I cannot, for the life of me, figure out how to run my spring boot so it's accessible with a domain name.
I have already changed my DNS settings so it's pointing to my Virtual Private Server, this VPS also runs some other apache based static websites, I'm pretty confident my DNS settings are correct.
My spring boot application is running using spring-boot-starter-tomcat, the application deploys fine, I can grab my .war file and deploy it using java -jar myApplication.jar on the server.
The application is also accessible remotely by writing my.server.ip:8080 on a browser.
However, I've been googling a lot and cannot figure out how to configure Spring Boot so that it'll use my Domain name, so that I can access the website in a standard way: www.mywebsite.com, or even better yet also add an Alias so both mywebsite.com and www.mywebsite.com are valid.
Can anyone point me in the right direction? I know this can be done in Tomcat but I have no idea of how to configure it.
Since this is a Spring Boot application I do not have .xml files, my Spring Boot configuration is in a application-prod.yml file, and the only .xml file I use is the pom.xml itself.
Any help would be greatly appreciated.