Jump to content

Multistore - Different IP - Would this work?


Recommended Posts

Hi,

 

We are very much considering implementing the PS1.5 multi-store feature.

 

I have read through the documentation many times and have search the forums far and wide.

 

I think I understand how it works and how to best set it up for our shop.

 

However, I have a question regarding the installation files and url setup.

 

So, correct me if I'm wrong, but I understand that I would add the shop group and shop through the BO multistore preference page. Here I would also add the url/domain of our secondary shop(s). I would than install a secondary (full) installation of PS in a subdirectory, and our virtual url will point to that physical url directory. We do install another fresh copy of PS in a subdirectory for the secondary shop(s), correct?

 

The main question I have is if this would be possible...

 

Can we assign a different IP address to the URL/domain of the secondary shop(s)? From my understanding, PS uses virtual hosts to send visitors to the correct shop url.

 

However, we want to have 2 separate URLs/Domains for each and every shop (not subdomains or subdirectories). For example, we want to use www.myshop1.com and www.myshop2.com each with a different IP address. They would be hosted on the same server and would share the same root directory and database. We do not want... www.myshop.com/shop1, www.myshop.com/shop2 OR shop1.myshop.com, shop2.myshop.com. Each store has to have its own unique url. We understand this is possible, but how about different IP address?

 

Thanks!

Link to comment
Share on other sites

So, correct me if I'm wrong, but I understand that I would add the shop group and shop through the BO multistore preference page. Here I would also add the url/domain of our secondary shop(s). I would than install a secondary (full) installation of PS in a subdirectory, and our virtual url will point to that physical url directory. We do install another fresh copy of PS in a subdirectory for the secondary shop(s), correct?

 

No, you shouldn't install any additional copy of prestashop, one installation and one DB are able to support any number of shops.

You can simply check this if you create two virtual hosts on your localhost: for example www.shop1.com and www.shop2.com

Then create two shops in Multishop backend and assign them these URLs.

 

In the form "Shop URL" specify virtual host URL in the field "Domain", final URL should be equal to "Domain" value. When shop is initialized it simply gets current http host (with method Tools::getHttpHost()), queries shop_url table to find appropriate shop ID and then renders the whole shop in accordance with received shop ID. There is no IP verification during this process so I think it's not an issue.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...