Here’s a quick scenario: you already have a server hosting a Liferay DXP installation and a database. It has many Users, Sites, and specific instance settings. If you need another such installation, then adding a Virtual Instance might be right for you.
You can run more than one Virtual Instance on a single server with a shared database, but separate data and configurations. Users are directed to the correct Virtual Instance via its unique domain name. And because Virtual Instances share an application server and OSGi container, they also share these customizations:
- Custom code deployed by developers and administrators.
- System-scoped configurations
.configfiles, changes made in Control Panel → Configuration → System Settings).
- Application server configuration.
Administrators can manage Virtual Instances in Control Panel → Configuration → System Settings.
Follow these steps to create a Virtual Instance:
Before you create a Virtual Instance, configure its domain name in your network.
Go to Control Panel → Configuration → Virtual Instances.
Click the Add button (). This opens the New Instance form.
Complete the New Instance form as follows:
Web ID: The instance’s ID. Using the domain name is a common convention.
Virtual Host: The domain name you configured in your network. When users are directed to your server via this domain name, they’ll be sent to the Virtual Instance that contains their data.
Mail Domain: The mail host’s domain name for the Virtual Instance. Email notifications are sent from the instance using this domain.
Max Users: The maximum number of user accounts the Virtual Instance supports. Enter 0 to support unlimited users.
Active: Whether the Virtual Instance is active. Note that inactive Virtual Instances aren’t accessible to anyone, even the administrator.
Click Save when you’re done filling out the form.
Now you can navigate to the instance using its domain name. You’re brought to what looks like a clean install of Liferay DXP. This is your new Virtual Instance! You can configure it any way you like. The remaining articles in this section show you how to configure an instance’s settings.