Submitted by SalvaLópez on Sun, 01/13/2019 - 08:06
Hello. I'm in order to run a VPS with an Opencart multi-store ecommerce. Each store will have his own geolocated domain / IP, but i need to point for same APP / DocumentRoot.
How can i to do it? I tried creating sub-servers, but can't point to same DocumentRoot.
Thank you.
Status:
Active
Comments
Submitted by andreychek on Sun, 01/13/2019 - 12:30 Comment #1
Howdy -- thanks for contacting us!
Just to verify --
Are you saying that you want to have multiple domains each with their own IP address, but each domain should point at one DocumentRoot?
That is, you'd have a DocumentRoot such as /home/main_app/public_html, and every domain will be pointing at that same directory?
Submitted by SalvaLópez on Sun, 01/13/2019 - 12:58 Comment #2
Hi andreychek and thank you for your help.
Yes, you right.
Just to clarify: I have Opencart at mydomain.com, with IP 123.123.123.123 and points to /home/mydomain/public_html. Now i need multiple domains points also to same folder /home/mydomain/public_html bu with different IPs
Example:
Thank you in advance.
Submitted by SalvaLópez on Mon, 01/14/2019 - 15:01 Comment #3
Up
Submitted by andreychek on Mon, 01/14/2019 - 15:51 Comment #4
Hmm, that's unfortunately not really something that the Virtualmin UI supports.
You can certainly add aliases to a given Virtual Server or Sub-Server, but in that case, the alias would have the same IP as the parent.
Talking to Joe about that, we think the only real way to accomplish what you're asking -- aliases with unique IP addresses -- would be to setup one domain within Virtualmin, to copy it's Apache VirtualHost definition, and then to make copies of it and manually modify them so that they're using the additional domains and IP addresses you wish to setup.
Sorry, I know that's a bit of a hassle, but that's unfortunately not a common setup that folks need.
Submitted by JamieCameron on Mon, 01/14/2019 - 18:40 Comment #5
Alternately, you could use regular domain aliases in Virtualmin, but change the IP addresses in DNS for each of those alias domains to point to different virtual IPs on your system.
Submitted by ADDISON74 on Wed, 01/16/2019 - 09:52 Comment #6
In my humble opinion this issue in not related to Virtualmin configuration. It should be solved inside OpenCart configuration using a module free or not. Two years ago I had a similarly request from a client related to a Magento store and I solved it buying an extension. That extension allowed me to configure one domain or multiple domains. The extension was dealing with client IP's. If the IP was from Germany the extension passed German store version, if UK the extension passed English store version. Choosing automatically a backend for a website is not a good idea in our days. I am traveling around the world frequently and getting local IP's. I hate getting a website language version other than native without having the chance to choose other. Some visitors use proxies and their IP's change in the routers chain. Finally it is your decision.
Submitted by SalvaLópez on Wed, 01/16/2019 - 10:46 Comment #7
My solution:
And its working properly.
Any notes about it?
Submitted by SalvaLópez on Wed, 01/16/2019 - 10:48 Comment #8
Thank you ADDISON74.
We auto-detect language via locale browser settings