Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Add support of MAGE_RUN_TYPE and MAGE_RUN_CODE param to nginx #192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ytorbyk
Copy link

@ytorbyk ytorbyk commented Feb 26, 2023

The current approach for configuring multistore Magento requires adding some changes to a project specifically for a local environment that will be used on production as well.
In order to avoid it we can configure it in files that are not going to be used on production.

The proposed approach requires adding two files into .warden folder:

  • .warden/nginx/http.conf, here you can add your rules for your domains
    map $http_host$request_uri $magento_multistore_key {
        default '';
    }

    map $http_host$uri $magento_multistore_type {
        default store;
    }

  • .warden/warden-env.yml, apply the config
version: "3.5"
services:
  nginx:
    volumes:
      - ./.warden/nginx/http.conf:/etc/nginx/conf.d/http.conf

@navarr navarr self-assigned this Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants