0

I have a web application created using Spring Boot. Multiple users (like Company1, Company2, Company3) are registered in this application and they all have their own data. Consider that this application is hosted at www.myapp.com. Now these companies want to access their personal data but from their own domain. Like Company1 wants to access their data from www.company1.com/data, Company2 wants to access theirs from www.company2.org/info, and Company3 wants to access theirs from www.company3.edu. Is this possible? If so, how?

Kshitij Bajracharya
  • 811
  • 2
  • 14
  • 37
  • Do you mean that the companies are already using those domains for their own web applications or can you map those domains to your 'www.myapp.com' server? – raven Nov 10 '19 at 12:24
  • #1 Do you need just have several domains for the same application? #2 Applications naturally works very well in a domain or subdomain like kshitij.com or kshitij.company1.com. If you need a custom context like www.company1.com/data , you need to refactor your web application to allow use custom context or url instead simple domain. And if your app has complex redirect you will cry. Please convince to your client to use domain or subdomain instead /data or /info.#3 Finally this is a job for http routes like nginx/haproxy not for application. In the next comment I will share you reference links – JRichardsz Nov 10 '19 at 14:13
  • #1 [complex redirects for /context instead domain](https://stackoverflow.com/questions/57503924/using-relative-redirect-in-spring-boot-fails) #2 [same app with several domains](https://stackoverflow.com/questions/40985784/nginx-multiple-node-js-applications-on-same-server-using-domain-path) #3 [nginx configuration](https://stackoverflow.com/a/54095059/3957754) – JRichardsz Nov 10 '19 at 14:19
  • Confirm your final scenario and I help you with nginx configurations – JRichardsz Nov 10 '19 at 14:21

0 Answers0