Welcome! Log In Create A New Profile

Advanced

Re: Unable to configure nginx as reverse proxy

António P. P. Almeida
February 17, 2012 10:54AM
On 17 Fev 2012 14h41 WET, nginx-forum@nginx.us wrote:

> Hi
>
> I am new to nginx and am trying to configure nginx as reverse
> proxy. Its broadcasting on the ip but its not forwarding the
> requests to the backend servers and nothing found in logs as well.
>
> Please let me know where i m doing the mistake.
>
> My topology and config----
> 2 webservers where apache is running and am configuring nginx as
> reversee proxy in one of them(X.X.X.9).
> X.X.X.8 is the ip which gets requests from the firewall.
>
>
> upstream backend {
> server X.X.X.9:80;
> server X.X.X.10:80;
> }
> map $http_host $name {
> hostnames;
> default 0;
> include domainlist;
> }
> server {
> listen X.X.X.8:80;
> server_name _;
>
> location / {
> proxy_pass http://backend/$http_host/;
> }
> }

It's unclear, for me at least, what you're trying to achieve. What's
the point of setting the $name variable in the above map directive?

Do you want to route the request to separate backends based on the
Host header? Is that what you want?

Please elaborate.

--- appa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Unable to configure nginx as reverse proxy

srk. February 17, 2012 09:41AM

Re: Unable to configure nginx as reverse proxy

António P. P. Almeida February 17, 2012 10:54AM

Re: Unable to configure nginx as reverse proxy

srk. February 17, 2012 01:19PM

Re: Unable to configure nginx as reverse proxy

srk. February 21, 2012 02:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
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