I'm trying to create an store language, and use a path on main domain to server that store. To do it I've already done all the nginx magic to made it select the correct store, but my problem is that store is giving 404 on all pages.
Now on my magento I have two stores:
The content managers has created a language store on https://pt.example2.com/ that seems to works, but now they want to move that subdmain to a path, so I've changed the Stores > Configuration > General > web to https://example2.com/pt/ and I've configured the Nginx to send the MAGE_RUN_CODE and MAGE_RUN_TYPE to Magento.
My problem is that all was working at the subdomain, but now in path I can see how the language changes to that store language, but everything gives me a 404 error (even the 404 page gives me an error saying that there's no 404 page configured).
I've tried everything I've found on internet, clearing cache, reindexing all, setup:upgrade in combination with cache clearing and reindexing,... trying to remove the path using nginx rewrites, remove the path from fastcgi_param REQUEST_URI (this creates a loop because the store detects that is not its main page and tries to redirect), but nothing works.
Someone knows how to fix this problem?