Reverse proxy for multiple domains
francis at daoine.org
Wed Aug 30 17:57:19 UTC 2017
On Sun, Aug 27, 2017 at 11:27:05AM +0000, Mik J via nginx wrote:
> > Thats because the pages are called by the reverse proxy server
> > like http://10.1.1.10:80/app/application1/;and it can't use a FQDN
> > because it's in a private adressing
> Francis: I don't follow that last part.=> I mean that the reverse proxy uses an IP to connect to the backend web server. If it used a fqdn, it has to resolve it, through a dns request
The backend web server can care about the IP:port you connect to, and
the Host: header you send.
You can connect to 10.1.1.10:80 and send a Host: header of "app1" if
you want to. No dns resolution involved.
Anyway, it sounds like you have this part working now; so that's good.
A request for /?some-thing came to nginx; nginx reverse-proxied the request
as /app1/?same-thing. That is all you want nginx to do, so it is working.
If your back-end wordpress handles that request incorrectly, that is a
question for your back-end wordpress configuration.
People on this list who know about wordpress configuration are more
likely to see the question if it is in a new thread with words like
"wordpress" in the Subject: line.
(If the actual question is "why does my browser request /?some-thing
instead of /thing.js ?", that might also be related to the back-end
> Another question, if I want to set expires header, would it be better to do it on the reverse proxy or on the backend server ?
Again, I'd suggest that people who know about "wordpress" and "expires"
are much more likely to see that question if it is in a thread with an
obvious Subject: line.
Good luck with it!
Francis Daly francis at daoine.org
More information about the nginx