nginx proxy_pass configuration to virtualhost

Tim Spencer | Spacesharing GmbH t.spencer at spacesharing.eu
Sat Dec 20 22:36:24 UTC 2014


Hi,

I would like to redirect to an external URL which is hosted as a apache 
virtual host.
nginx resolves the host of the url which obviously does little to 
resolve to the correct web root on the server.

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

I have googled but obviously too many search result feature nginx 
configuration for virtual hosts.

Any hints would be kindly appreciated.

Lo5t

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20141220/befef50b/attachment.html>


More information about the nginx mailing list