Edit in GitHubLog an issue

Configure multiple websites or stores

Cloud Docker supports multiple websites or stores by adding subdomains to your configuration.

See Understanding websites, stores, and store views.

To add support for multiple websites and stores:

  1. Ensure that the php.ini file includes the configuration for the magento-vars.php file:

    Copied to your clipboard
    auto_prepend_file = /app/magento-vars.php

    Cloud Docker for Commerce applies the configuration in the php.ini file to the Docker environment if it is included in the root directory of your project.

  2. Add each subdomain to the /etc/hosts configuration file.

    Copied to your clipboard
    127.0.0.1 magento2.docker
    127.0.0.1 second.magento2.docker

After updating the php.ini file and adding subdomains, start the Docker environment and complete the following tasks to update the website and store configuration from the Admin:

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.