Welcome! Log In Create A New Profile

Advanced

Re: nginx proxy_pass configuration to virtualhost

Francis Daly
December 21, 2014 02:44PM
On Sat, Dec 20, 2014 at 11:36:24PM +0100, Tim Spencer | Spacesharing GmbH wrote:

Hi there,

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

There may be subtleties about your configuration that have not been
included; but I'm not seeing any obvious reason why just changing one
line should not cause it all to work for you...

> location / {
> proxy_set_header Host $host;

Change that to be

proxy_set_header Host www.urlforvirtualhost.com;

and test again.

> proxy_pass http://www.urlforvirtualhost.com;
> }

> The question is how do I allow proxy_pass without nginx resolving
> the ip-address of the host?

That question is not very clear to me, I'm afraid.

If the above change is insufficient (and it does include assumptions
such as: you will know when the IP address of the upstream
www.urlforvirtualhost.com changes and will restart nginx then), then it
may be helpful for you to describe what you want to happen, in terms of
what machine makes what request to what other machine.

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

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: 266
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