Welcome! Log In Create A New Profile

Advanced

Re: nginx proxy_pass configuration to virtualhost

mex
December 21, 2014 05:31AM
Hi tim,

> Hi,
>
> I would like to redirect to an external URL which is hosted as a
> apache
> virtual host.

redirect or proxy_pass? correct wording is important here


> nginx resolves the host of the url which obviously does little to
> resolve to the correct web root on the server.

i dont understand what you mean here. if nginx doesnt resolve a dns-name
how should it know how to deal with it? dns-names are for humans.



>
> | server {
> server_name localhost;
> location / {
> proxy_set_header Host $host;
> proxy_pass http://www.urlforvirtualhost.com;
> }
> }
> |
>
> The question is how do I allow proxy_pass without nginx resolving the
> ip-address of the host?

but why dont you want nginx to resolve the IP?


i'm not sure this will work as expected, except you put in the ip.
but then the apache on the other side should be configred
with the ip in the virtualhost




cheers, mex
Subject Author Posted

nginx proxy_pass configuration to virtualhost

Tim Spencer | Spacesharing GmbH December 20, 2014 05:40PM

Re: nginx proxy_pass configuration to virtualhost

mex December 21, 2014 05:31AM

Re: nginx proxy_pass configuration to virtualhost

Tim Spencer | Spacesharing GmbH December 21, 2014 08:14AM

Re: nginx proxy_pass configuration to virtualhost

Francis Daly December 21, 2014 02:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 55
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready