0
I’m developing a web application using Springboot, and other technologies. This application will be unique, that is, an application must serve multiple users (customers).
Each user will have a page, which is composed as follows: www.meusite.com.br/joao_da_silva
The domain of the site can be: meusite.com.br and what is after the bar, is its user name (in case joao_da_silva).
So far so good, I developed the application, and it’s working well. My question is the following:
The client can have an 'x' domain (example: www.joaodasilva.com.br) and redirect to www.meusite.com.br/joao_da_silva without changing the URL?
I saw that godaddy has a masking feature, but there is an HTML with iframe, besides being slow, it loses all the responsiveness of the site, because the masking of godaddy uses HTML 4. This does not suit me, because I have already tested.
As I use Tomcat server for other applications I have, I have already used a kind of virtual host, changing the file server.xml and added a Host tag, I can point a domain, to a folder (application), but this does not solve me (or configured wrong)since I need to point several client domains to the same application, changing only the endpoint (which is the client name), if I put 2 host to the same application Tomcat loops, and does not stop deploying. Maybe I made the configuration wrong, but so far I have not found any solution.
What I changed on the server.xml is like this:
<Host name="joaodasilva.com.br" appBase="MEUAPP" autoDeploy="true" unpackWARs="true">
<Alias>www.joaodasilva.com.br</Alias>
<Context path="" docBase="/var/lib/tomcat7/webapps/MEUAPP/joao_da_silva" debug="0"/>
</Host>
<Host name="mariapaula.com" appBase="MEUAPP" autoDeploy="true" unpackWARs="true">
<Alias>www.mariapaula.com</Alias>
<Context path="" docBase="/var/lib/tomcat7/webapps/MEUAPP/maria_de_paula" debug="0"/>
</Host>
What I want to do is to access the domain: www.joaodasilva.com.br point to www.meusite.com.br/joao_da_silva (site: meusite.com.br endpoint: joao_da_silva) without changing the URL.
Take a look in this material here, can give you a north on the problem.
– Weslley Tavares
Yeah, but I use Tomcat, you know if there’s any way to redirect a domain to a context of my application?
– Ademilson Marsiglio