Nginx reverse proxy through vpn -- No site is configured

So I have set up phabricator before, but it was in a different situation. This time around I am passing traffic from a vps to my actual server through a vpn, as I cannot port forward on my actual server.
Everything works fine, until I try to go to the phabricator instance (at dev.gemini.city) and it says

Site Not Found
This request asked for “/” on host “10.0.0.2”, but no site is configured which can serve this request.

Even though it says that, I can access the css files and the js files perfectly fine through dev.gemini.city. I will note that 10.0.0.2 is the actual server’s vpn ip and phabricator.base-uri is set to ‘http://dev.gemini.city’. If I set phabricator.base-uri to ‘http://10.0.0.2:8876’ it no longer complains but doesn’t load the js or css files as it tried to access them at 10.0.0.2 which I obviously don’t have access to externally. At a loss right now, any help is appreciated.
I am using nginx as a reverse proxy on the vps, currently proxy_pass’ing to 10.0.0.2:8876 from dev.gemini.city.

Something (nginx?) is overwriting the HOST header in your HTTP requests, which is what Phabricator is using for routing (for “Sites”).
See if you can convince nginx not to do that.
Alternatively, you can configure phabricator.allowed-uris to accept 10.0.0.2 as a valid host for phabricator, but some things might not work properly in that case.

1 Like

Thank you, that was it. Had to add

proxy_set_header Host $host;

To my nginx conf on the vps. Only issue now is the fontawesome icons are showing as squares, but that’s most likely a seperate issue. Thanks again man :slight_smile: