I want to configure a multistore shop like this:
domain1
- http://www.domain1.com/nl/ -> website 1, store view 1
- http://www.domain1.com/en/ -> website 1, store view 2
- http://www.domain1.com/de/ -> website 1, store view 3
- http://www.domain1.com/fr/ -> website 1, store view 4
domain2
- http://www.domain2.com/nl/ -> website 2, store view 1
- http://www.domain2.com/en/ -> website 2, store view 2
- http://www.domain2.com/de/ -> website 2, store view 3
- http://www.domain2.com/fr/ -> website 2, store view 4
The store code approach is not possible because we need to have the same store code multiple times.
What would be the best way to achieve this with nginx?
My configuration: Ubuntu 16.04LTS, PHP7.1(FPM), nginx/1.10.3, Magento 2.2.2 CE