if I change the listen to localhost and I use the reverse proxy, the sao client appear correctly but I’m not able to see the database list. Also if I try to fill up data into login form I get a generic error !!!
Why you are redirecting only tryton requests? Is tryton the name of your database?
If you use a diferent database it will not work.
Why you need to rewrite?
We use nginx in front of the docker image (basically to manage multiple hosts on the same server and ssl certificates). We use a single route to redirect all request as seen below:
I’m not an nginx expert but as far as I understand you don’t need to rewrite the path. Just use two locations and forward each one to the required upstream server. Something like this:
I already check the nginx documentation.
even with the method you suggest I get the some behaviour as before
the login fails . and not database is selected.
the problem is that in the log of tryton and in the log of the browser i do not have any information !!!
I think it is quite difficult to get Tryton/Sao to work if it is in a subpath. If I am not mistaken, after the login page is served from DOMAIN FOR SALE the subsequent POST requests from Sao go back to www.myDomain.org and not DOMAIN FOR SALE. This is why it works with listen = 0.0.0.0:8000, because in this case trytond is replying directly to the POST requests, instead of via nginx.
Are you sure? Note that nginx will cache all the static files so if your seen the page on time it will be shown correctly when the server is not properly configurad.
You can see in your logs from frist post that it responds with 304 ( which means no modified ) so the server does not send any file and the browser loads the files from it’s cache.
Indeed as far as I know subpath is not really working. But if someone wants to propose a patch to support it, it will be welcomed (even if it is not really a priority).
I’ve tested and I can confirm that it’s not working. I’ve started to write a patch but it is not fully working. I can logging but the menu screen is not properly loading. I need some more time to test it.
@mboscolo could you please apply it to your setup and test it works correctly?
I’ve also posted on the issue the required nginx configuration to make it work.
Dear @pokoli I check the patch and I’m able to see the database list and login correctly to the sao client.
I also try to create and save entity and it looks to work smoothly.
No because we use the sao images which already contains sao and are configured to server it’s static content. So we use nginx to proxy the request directly to the container, manage ssl certificates (using letsencrypt).
This allows to receive all updates (python code and sao) by pulling the docker images.
We mount SAO from Tryton docker image in a nginx container to serve SAO from there. We thought that maybe Nginx would be more efficient in this task than uwsgi. Do you think it is worth to serve SAO from nginx instead of uwsgi?
As we have nginx installed on the host (we redirect based on the host to diferent ports environments) we do no think we need an extra container for serving static files. But normally there is no way that works for all.