Comment faire dans nginx ce que j'ai fait dans htaccess ?

Use nginx outside of docker container (see Running other websites on the same machine as Discourse) and you can rewrite those URLs using nginx configuration.

Syntax is:

server {
  server_name  sub.domain.com;
  rewrite ^(.*) http://12.34.56.78/a/particular/path/ permanent;
}