Skip to content

How can I set the domain under a reverse proxy? #313

Closed Answered by rgpublic
rgpublic asked this question in Support
Discussion options

You must be logged in to vote

I could solve this via:

ProxyPreserveHost on

Still, I think it would be very helpful for many other users, if you'd mention a typical Apache reverse proxy setup in the docs. It's basically only these three lines in a virtual host:

    ProxyPreserveHost on
    ProxyPass / http://127.0.0.1:3000/
    ProxyPassReverse / http://127.0.0.1:3000/

BTW: In situations where such an option is not available, I think the X-Forwarded-Host header should also be supported:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host

If it is set, it should have precedence over the normal Host header.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by msukkari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants