Backend correctly analyzes 'host' header. To check it I created simple ServletFilter to 'set' this header and after it backend forms correct URLs.
So my problem will be solved if I manage to set 'host' header in nginx configuration. I'm still confused why I can set this header for non-SSL port and I can't do it for SSL. What am I missing?