I have a spring boot application. Usually I run my spring applications on PaaS instances, and setting the domain name from them is quite simple, however I run it on a virtual private server, and I canβt, for life, figure out how to run my spring, so it is available with the domain name .
I have already changed my DNS settings so that it points to my virtual private server, this VPS also launches some other static apache based websites, I'm sure my DNS settings are correct.
My spring boot application works with spring-boot-starter-tomcat , the application deploys fine, I can capture my .war file and deploy it using java -jar myApplication.jaron the server.
The application is also accessible remotely by writing my.server.ip:8080in a browser.
However, I searched a lot and cannot figure out how to configure spring boot so that it uses my domain name so that I can access the website in the standard way: www.mywebsite.comor better yet, but also add an alias, so both mywebsite.comand are acceptable www.mywebsite.com.
Can someone point me in the right direction? I know this can be done in Tomcat , but I donβt know how to configure it.
Since this is a spring boot application, I have no files .xml, my spring boot configuration is in a file application-prod.yml, and the only file .xmlI use is itself pom.xml.
Any help would be greatly appreciated.
source
share