Setting up a multidomain test environment
This page explains how to test a Multi-domain setup on a local test/dev machine.
First, a quick reminder: when testing a single domain, you should always use
localhost and not the IP address of your machine, nor the Windows name of your machine. Trust our experience that cookies may act weird on the IP address or the windows name. On localhost they work like they do in real life (on full domain names).
Now, in order to test b2evo on multiple domains all from the development machine, the easiest thing is to set up some fake domains for use in the test URLS.
hosts file with a text editor.
- On Linux and Mac OS X, this is
/etc/hosts. Because the file may be protected, you mat need to type a command like this in your Terminal:
sudo nano /private/etc/hosts
- On Windows XP, this is
C:\WINDOWS\system32\drivers\etc\hosts. You should be able to open the file with Notepad.
This file is where localhost is defined. Like this:
Add the following lines:
127.0.0.1 all.b2evotest.loc 127.0.0.1 a.b2evotest.loc 127.0.0.1 b.b2evotest.loc 127.0.0.1 links.b2evotest.loc
Using these domains in the URL will produce the same results as localhost, except the cookies of these domains won’t be shared with localhost…
.localmay trigger some other protocols like Bonjour.
To tie your collections to these URLs, you must set their absolute URLs accordingly in the admin. See: Using Multiple Domains
Last edit by on July 10th, 2016
Form is loading...