zepgram / magento2-fast-vm

Optimal vagrant developer box for Magento2. Folders synced by nfs/rsync. This box includes Magento developer utilities.
MIT License
110 stars 35 forks source link

How to configure nginx to use multiple stores with the same domain #57

Closed srgrbkl closed 4 years ago

srgrbkl commented 4 years ago

need to create multiple stores with the same domain: site.com/en/ site.com/fr/ site.com/de/ I changed magento.ngnix.conf (added fastcgi_param MAGE_RUN_CODE 'en'; fastcgi_param MAGE_RUN_TYPE store;), but I get a 404 error(). do you have any ideas?

zepgram commented 4 years ago

Hi @srgrbkl
Did you change the base_url foreach website ?

srgrbkl commented 4 years ago

yes, base_url now http://dev.site.com/en/ and created en folder with PARAM_RUN_CODE

zepgram commented 4 years ago

I'm note sure this is a best practice, but this should work: https://gist.github.com/thagxt/0f605f0a8a95c79302db0d2f04383788