cross and shared database

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
1/28/2021 12:39:03 PM
Gravatar
Total Posts 163

cross and shared database

Hello, I already have a mojo site on one domain and would like to make another one on another domain. but I would like to ensure that users registered on the first site can access both the first and the second. the two sites are based on MS-SQL as a database. is it possible to do this?

1/28/2021 1:24:18 PM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

I would suggest using the Multi-Tenancy feature and enable Related Sites Mode.

Thanks,
Joe Davis

1/28/2021 1:26:30 PM
Gravatar
Total Posts 47

Re: cross and shared database

Hi Massimiliano,

I think it is possible. You have to change a parameter in the web.config.

 

Approximately at line 300 you find:

    <add key="UseRelatedSiteMode" value="false" />
   

Changing the  "UseRelatedSiteMode" to "true", makes the magic.

1/30/2021 4:35:32 AM
Gravatar
Total Posts 163

Re: cross and shared database

I will certainly do some tests as soon as I can. thank you very much, and I will ask you for explanations as soon as I try to do so

1/31/2021 11:52:58 AM
Gravatar
Total Posts 163

Re: cross and shared database

if, however, I move the second domain to the same server as the main one, doesn't I need to do anything about the DNS ?

2/1/2021 10:26:04 AM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

You could get away with putting the sites on different servers but use the same database. Configuration could get tricky but it is theoretically possible.

Thanks,
Joe

2/1/2021 11:23:48 AM
Gravatar
Total Posts 163

Re: cross and shared database

therefore,

if i had the two domains on the same server, i mean same IP address, consider that i am talking about shared hosting on aruba. the steps to take are:

  • install mojo on the second domain, configuring it with the database of the first domain.
  • configure the first domain to use multisite, as suggested and as per the guide.

but at the DNS level I don't have to do anything else?

2/1/2021 3:47:16 PM
Gravatar
Total Posts 2253

Re: cross and shared database

Hey Massi,

If both domains are on the same IP Addres (server), you don't need to install anything. Just add the domain to the first website using Aruba's control panel, then create a new site using mojoPortal (Administration > Site List > Add Site), and then set the domain on the Site Mappings tab of the second site.

Step-by-step instructions are here.

Thanks,
Joe

 
2/2/2021 11:43:58 AM
Gravatar
Total Posts 163

Re: cross and shared database

yes,

but I meant on a shared host. meaning two different domains even if on the same server and therefore the same IP. with each their own web space. on the dns I should not do anything then?

2/24/2021 2:50:29 PM
Gravatar
Total Posts 163

Re: cross and shared database

so i did some tests but i didn't get the results i wanted. I have two domains with two different sites. i wish the two sites could share users and roles, including registration. ba does not structure and content of the site. in the tests that I carried out following the instructions, if I make changes to one site, I also find them on the other and vice versa. I repeat that the two sites must be done differently but I want to share only users and roles.
can you tell me precise instructions?

I installed a mojo installation on the second dminio by configuring the same database as the first site. users are shared, but also structure and content of the site. while I would like to share users only

2/25/2021 5:30:59 PM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

I think you are creating a second site in your control panel and copying the mojoportal files from the first one to the second one. You don't need to do that. 

I've created a video here that shows how to go about setting this up. 

Thanks,
Joe

 
 
2/26/2021 11:34:14 AM
Gravatar
Total Posts 163

Re: cross and shared database

here I am,

 

I'm afraid I didn't know how to explain.

 

I explain step by step what I did. I DID NOT COPY the content from the first site to the second but I did a NEW INSTALL with the connection string of the first site. the first domain, which we will call, www.a.it already has a site that has been running for years. in a second domain that we will call www.b.it I made a NEW mojo installation using the connection string of the same database of domain A. they are two different physical domains even if they reside on the same server machine. it happens that the site on domain B shares the users but also the whole structure and content.

I don't understand if I have to do something in DNS management, and if so of which domain?

 

3/1/2021 10:48:09 AM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

You do not need a second IIS site. Everything is done with one install of mojoPortal on a single site, pointing to a single database.

Remove your second site from IIS and then do the following:

  1. Login to the existing mojoPortal site (there should be only one at this point).
  2. Go Administration > Site List and click "Create New Site"
  3. Give your new site a name and click the Save button. This will be your second site.
  4. The site will be saved and the Site Settings page will refresh.
  5. Click the "Site Mappings" tab.
  6. Enter the hostname/domain for the second site in the text box under the "Host Names" heading and click the "Add Host Name" button.
  7. In your DNS provider, make sure the IP Address for the hostname/domain you entered in the previous step is set to the same IP Address as the first site you setup.
    For Example: if your main mojo site is at "mymojosite.com" and it's IP Address is "1.2.3.4", and your second site (that you are creating with these instructions) is supposed to be at "site2.mymojosite.com" (as entered in the step above), the IP Address for "site2.mymojosite.com" needs to be "1.2.3.4".
  8. You should now be able to browse to the new site you just created.

The video I created shows all of this.

3/1/2021 12:44:47 PM
Gravatar
Total Posts 163

Re: cross and shared database

yes .. but in the case of the instructions a third level is pointed, while I need to point to another domain (www.domain.it) which in any case has the same IP as the main domain.

let me explain.

 

main domain (www.main.it) while the site to be shared by users will be (www.second.it)

3/1/2021 3:11:36 PM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

It will still work the same way with your domains:

  1. Login to the existing mojoPortal site (there should be only one at this point, www.main.it).
  2. Go Administration > Site List and click "Create New Site"
  3. Give your new site a name and click the Save button. This will be your second site.
  4. The site will be saved and the Site Settings page will refresh.
  5. Click the "Site Mappings" tab.
  6. Enter the hostname/domain for the second site (www.second.it) in the text box under the "Host Names" heading and click the "Add Host Name" button.
  7. In your DNS provider, make sure the IP Address for the hostname/domain you entered in the previous step is set to the same IP Address as the first site you setup.
    For Example: if your main mojo site is at "main.it" and it's IP Address is "1.2.3.4", and your second site (that you are creating with these instructions) is supposed to be at "second.it" (as entered in the step above), the IP Address for "second.it" needs to be "1.2.3.4".
  8. You should now be able to browse to the new site you just created.

Thanks,
Joe

3/2/2021 11:49:22 AM
Gravatar
Total Posts 163

Re: cross and shared database

Hi Joe,

I tried, but of course it doesn't work at all. both the primary and second sites reside on the same machine with the same IP. I'm talking about shared hosting (aruba) and the dns of the two sites pointing to the same IP because it is the same machine.

I followed your instructions to the letter but it can't work. it is a shared hosting.

therefore on that server it is possible that there are as many as 200 domains. in fact all my sites are on that machine. if I enter the host name of the second domain, however, by going to the second site he will never be able to point to the first ... even if the DNS points to the same IP.

don't work  don't work

3/2/2021 12:15:02 PM
Gravatar
Total Posts 163

Re: cross and shared database

otherwise I don't know .. if there is a way to configure the dns differently .. but they point to the same IP. CName record? SVR?

3/8/2021 10:05:10 AM
Gravatar
Total Posts 2253

Re: cross and shared database

Hi Massi,

I'm just logging our direct email conversation here for others.

The problem with your setup is your host doesn't allow you to attach more than one domain to a website. That being the case, you can't use the multi-sites feature of mojoPortal.

Thanks,
Joe

You must sign in to post in the forums. This thread is closed to new posts.