Closed lukasan closed 2 years ago
Yeah, after tinkering I figured the fix is as simple as it can get:
on the manager, I had to change the Hostnames input to: public_ip/en
, and not the internal localhost link. No need to edit Nginx for this.
Silly me, I guess...
I'm using .NET 5, PiranhaCMS 9.2.0
When following the instructions in https://piranhacms.org/docs/v9/tutorials/how-to-use-multitenancy, on Windows everything works as expected. On production Ubuntu 20.04.
I added values to the /etc/hosts file analogous to the tutorial's Windows:
Added two additional sites in the manager with
localhost/en
andlocalhost/ru
endpoints.curl localhost:5000/en
from inside the server returns me 200 OK with the correct content set.with Nginx I have the config as follows:
The default site works as expected, but when going to another language config like
localhost/en
orlocalhost/ru
that should translate toserver_ip/en
andserver_ip/ru
, I get 404.I tried adding another location (with variations commented-out and not limited to them):
What I don't understand is how it should be mapped, since it uses hosts file to work.
I believe it would be a fairly common use-case and should be even added to the documentation tutorial mentioned above.
Thanks