We are trying to set up a new Magento 2.3 instance to have multiple websites under a single domain.
I have read most of the posts based on this situation, but most either talk about multiple domain or using apache and therefore .htaccess.
We are using nginx and the default .conf that is given by Magento base install.
Our client has multiple locations based on countries e.g. UK, NY, Chengdu and each location has multiple languages. For this reason we would like to set up the locations as websites and the URL structure to be:
We have set up the websites with the correct store views.
We have set the based URL's on a website level to the same as above.
I have tried to created directories in /pub for the locations and copied in the index.php.
I have tried setting the MAGE_RUN_* codes in nginx.
But the closest I have got to getting this working is every page under a website (/uk) 404'ing.
What I am asking for is if someone could point me in the right direction to the correct nginx configuration to make websites work like this without 404ing?
The structure has to be like this and not under different domains or subdomains.