0

I hope some guru can give me some help outta here since I don't know anymore where to look or what to do.

I have a single petition from a client that is being a little tricky to me.

My scenario have two machines, one for NGINX and other for Apache. In the Apache machine, they've setup two virtual hosts:

www.pre.elartedelaamistad.es

www.pre.nur-luz.es

Each website basically loads a infex.html which loads one flash file (which is the site itself) and some jpg files...

Now, some people who have only access to this domain: prefocus.abg.corp need/want to see this site in the following way:

prefocus.abg.corp/elartedelaamistad -> www.pre.elartedelaamistad.es

prefocus.abg.corp/nur-luz -> www.pre.nur-luz.es

They want to make a proxy_pass, not a redirection.

The Apache machine does not have a virtual host for prefocus.abg.corp, that's why if I make a proxy_pass I need to include a proxy_set_header Host, but then.., if I make it that way, I may only use one proxy_set_header Host in the / location.

I knwow I've explained myself very bad, I just can't found another way to tell it. This petition by itself is weird.

So, ... does anyone has some familiarity with this weird stuff?

Many thanks in advance.

lgg
  • 141
  • 2
  • 11

1 Answers1

1

I don't really get you with the proxy_set_header Host and for the lack of virtual host. But wouldn't something like do the job ?

ProxyPass /elartedelaamistad http://www.pre.elartedelaamistad.es
ProxyPassReverse /elartedelaamistad http://www.pre.elartedelaamistad.es

ProxyPass /nur-luz http://www.pre.nur-luz.es
ProxyPassReverse /nur-luz http://www.pre.nur-luz.es
Pierre-Alain TORET
  • 1,254
  • 8
  • 14
  • Thank you so much for answering, I already managed to solve this out, but not with this original scenario which is quite messy in my opinion. Y setup two diferent virtual hosts in nginx and each one makes a proxy pass to the corresponding apache virtual host. Thanks again mate! – lgg Oct 07 '15 at 15:42