Anyone know how can set the $MAGE_RUN_CODE & $MAGE_RUN_TYPE variables for a Magento 2 multi site using ddev-local? I have added the new domain to the additional_hostnames variable in .ddev/config.yaml - but now I need to tell the nginx docker container to serve the magento store front when that newstorefront.ddev.site domain is requested. Any ideas? Thanks.
I have got this working by overriding the .ddev/nginx_full/nginx-site.conf and adding the following lines towards the top of the server block (just before where it defines if ($mage_run_code = '') {
:
if ($http_host = mysecondsite.ddev.site){
set $mage_run_code 'mysecondsite_en';
set $mage_run_type store;
}
Now it all works correctly.
Thanks