Setting up a multidomain test environment
This page explains how to test a Multi-domain setup on a local test/dev machine.
In order to test b2evo on multiple domains all from the development machine, the easiest way 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 b2test.loc 127.0.0.1 www.b2test.loc 127.0.0.1 a.b2test.loc 127.0.0.1 b.b2test.loc 127.0.0.1 photos.b2test.loc 127.0.0.1 forums.b2test.loc
Calling these domains in the URL field of your browser will do the same as calling
localhost, except the cookies of these domains won’t be shared with localhost…
.localmay trigger some other protocols like Bonjour.
Note: a tool like MAMP PRO can automatically configure your
hosts fiel through an UI.
hosts file is configured, you need to tie each of your collections to a specific domain from the above. You can do this in the Collection base URL by using the "Sub-domain" or "Absolute URL" option.
See also: Using Multiple Domains
Created by • Last edit by on Aug 06, 2016
Form is loading...