Welcome! Log In Create A New Profile

Advanced

Re: Reverse proxy for multiple domains

Francis Daly
August 30, 2017 01:58PM
On Sun, Aug 27, 2017 at 11:27:05AM +0000, Mik J via nginx wrote:

Hi there,

> > 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.


> I still have problems, the site doesn't diplay properly because it can't load a javascript

> The request for the javascript looks like thathttp://application1.org/?wooslider-javascript=load&t=1503832510&ver=1.0.0 HTTP/1.1It arrives on the backend server I see it in the logs (file specified in the stanza location)
> 10.1.1.10 forwarded for IP_CLIENT - - [27/Aug/2017:13:15:12 +0200] "GET /app1/?wooslider-javascript=load&t=1503832510&ver=1.0.0 HTTP/1.1" 404 5 "http://application1.org/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"

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
config.)

> 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!

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy for multiple domains

Mik J via nginx August 10, 2017 05:18PM

Re: Reverse proxy for multiple domains

Francis Daly August 17, 2017 03:46PM

Re: Reverse proxy for multiple domains

Mik J via nginx August 18, 2017 03:04AM

Re: Reverse proxy for multiple domains

Francis Daly August 20, 2017 04:10PM

Re: Reverse proxy for multiple domains

Mik J via nginx August 27, 2017 07:28AM

Re: Reverse proxy for multiple domains

Francis Daly August 30, 2017 01:58PM

Re: Reverse proxy for multiple domains

Mik J via nginx May 21, 2018 09:58AM

Re: Reverse proxy for multiple domains

Francis Daly May 22, 2018 04:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 240
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready