b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Installation / Upgrade
  3. Advanced Setup
  4. Multi-Domain Setup
  5. Setting up a multidomain test environment

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.

Open the 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:

127.0.0.1	localhost

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…

Warning: we recommend using .loc instead of .local, since .local may trigger some other protocols like Bonjour.

Note: a tool like MAMP PRO can automatically configure your hosts fiel through an UI.

Once your 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 Panel by using the "Sub-domain" or "Absolute URL" option.

See also: Using Multiple Domains

Created by fplanque • Last edit by fplanque on 2016-08-06 18:02 • •

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
    • New Installation
    • Upgrade
    • Configuration files
    • Advanced Setup
      • Test features
      • Intranet installation
      • Intranet setup
      • After Installation / Upgrade
      • Setting up the Scheduler
      • Multi-Domain Setup
        • Using Multiple Domains
        • Setting up a multidomain test environment
        • Logging-in on multiple domains
      • Multiple instances
      • File Permissions
      • How to change the location of admin.php
      • Google API key
      • GitHub API key
    • Migrating from Another System
    • Moving your b2evolution Site
    • FAQ & Troubleshooting (Installation / Upgrade)
    • Assumed User Skills
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Open-source blog

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque