magento2 – Multi Store Magento Cloud 2.2 – Local Configuration

I'm trying to set up a Magento Cloud 2.2.2 site with multiple stores.

I'm using Vagrant, with PHP 7.1 and Nginx.

Nginx uses the stock M2 Ngxin conf, with added SSL support.

There are some shops, but for the moment I focus only on the default and British stores.

I made a new record in /pub with the site code, / pub / uk and deposited in an index.php

try {
requires __DIR__. & # 39; app /../../ / bootstrap.php & # 39 ;;
} catch ( Exception $ e) {
echo <<< HTML

Automatic loading error

{$ e-> getMessage ()}

HTML; output (1); } $ params = $ _SERVER; $ params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = & # 39; uk & # 39 ;; $ params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = & # 39; website & # 39 ;; $ bootstrap = Magento Framework App Bootstrap :: create (BP, $ params); / ** @var Magento Framework App Http $ app * / $ app = $ bootstrap-> createApplication ( Magento Framework App Http :: class); $ bootstrap-> run ($ app);

Add a store code to URLs is set to Disabled.

I can access http: //magento.test and at http: //magento.test/uk, but when I try to access a category on the UK site, page 404 will appear. displayed.

Added to this, although they are in developer mode, the assets are not generated automatically. I did an initial static deployment and this made the site work by default but when you go to /United Kingdom his look in the path / uk / pub / static which does not exist.