[opencms-dev] Doubts about pointing several sites to answer the same dns domain

Alex Kandzior alex at opencms.org
Thu May 19 17:14:42 CEST 2022


In openCms 12 and newer there is a features that can do something like this.

This is available in the Website configuration dialog (in the Website app).

The last tab of the Wesite configuration is named „Alternative site root“.
Here you can enter a 2nd site root path and a suffix. 
The suffix will be appended in Explorers site selector to the sites „Title“ to select the 2nd alternative site root.
Then you can add a list of path prefixes.
All path prefixes given there will be drawn from the 2nd alternative site root, all other requests will go to the regular site root.

The use case for this is a „long relaunch“ where the initial site has a number of subsides that are replaced one by one.

For example:

/sites/test1 has the Title „Test1“ and has a Website configured to answer www.test1.com <http://www.test1.com/>.
/sites/test2 is added to this Configuration as alternative site root with the prefix „[Relaunch]“.
The path „/somepath“ is added  to the list of path prefixes in the alternative site root.
> In the site selector, you will now see „Test1“ and „Test1[Relaunch]“.
> If a request comes that matches www.test1.com/somepath/* <http://www.test1.com/somepath/*> this will be served from /sites/test2/somepath/*.
> All other requests will be served from /sites/test.

Depending on how your application is written, there can be side effects to this solution that must resolved in your code.

HTH

Alexander Kandzior

Alkacon Software - The OpenCms Experts                                                    
http://www.alkacon.com - http://www.opencms.org                                                          


> Am 19.05.2022 um 15:32 schrieb Deiverson Jorge Lages da Silveira via opencms-dev <opencms-dev at opencms.org>:
> 
> Dear,
> 
> We have a complex situation that we need to point the same DNS to 2 sites within opencms, for example: www.test1.com <http://www.test1.com/> will answer for /sites/test1 and /sites/test2.
> 
> It is possible to configure OpenCms for /sites /test1/ and /site/test2/ respond to the same DNS, for example www.test1.com <http://www.test1.com/>?
> 
> Regards
> 
> -- 
> Deiverson Jorge Lages da Silveira
> Devsecops
> www.squadra.com.br <http://www.squadra.com.br/> | www.grena.design <https://grena.design/> | www.justdigital.com.br <http://www.justdigital.com.br/>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20220519/f662d5b4/attachment.htm>


More information about the opencms-dev mailing list