Reinis Rozitis r at
Wed Feb 12 08:03:27 UTC 2020

> Hi!,
> I do not understand what should I modify.

The problem is your backend application (I assume node app) which listens on the 8080 port. While nginx is doing everything right the app responds and constructs the urls using internal ip and/or 'localhost'.

Depending on what the app uses for the urls you could try to add:

proxy_set_header Host $host;

in the location / { proxy_pass  ... }  block (for some reason you have it only in the server block which listens on port 81).


More information about the nginx mailing list