Phabricator apache vhost config with proxy

Hello, im facing configuration issue.
I have multiple web servers on single public IP. Each server is separate linux instance with assigned local ip.
I have created Web reverse proxy and redirect all 80/443 traffic from wan to this proxy.
I’m using CentOs 7 with latest updates, and apache 2.4.6 on all instances.

Vhost on this proxy for just do simple redirect to
Vhost on this proxy for uses lets encrypt certificate and proxy pass like this

ProxyPass / http://<local ip>:80/
ProxyPassReverse / http://<local ip>:80/

phabricator local.conf have set this

"phabricator.base-uri": "",

No when i access phabricator im proxied to the server with this error message

This request asked for "/" on host "<local ip>", but no site is configured which can serve this request.

I have tried setting base-uri or allowed-uris, but this will cause my computer to try connection to this local ip. Which of course doesn’t work.

So I set this on proxy vhost

ProxyPreserveHost On

But now while accessing I enter redirection loop to
Now I’m stucked, I will appreciate any ideas where I could make mistake.

It might be that the current redirect loop you’re seeing is because your proxy terminates the https, and phabricator responds with “call me with https”.

You may need to just disable require-https option in Phabricator, or maybe somehow add a flag via the proxy that says “this is really https”, but I don’t remember what flag that would be.

There is some documentation that might help with this scenario here:

I created preamble according to the docs with HTTPS = true and things started working ok.
Thanks very much!