Welcome! Log In Create A New Profile

Advanced

Proxy pass confusion

Jon Drukman
August 24, 2012 04:42PM
Here is my server setup:

Amazon load balancer (loadbalancer.aws.com) -> nginx servers in
reverse-proxy/caching mode -> back end PHP servers

If I visit the nginx server directly in my browser, everything works
perfectly.

If I visit loadbalancer.aws.com, the nginx server redirects me to
http://decupstream, which is what I named the upstream block in my
configuration. The nginx.conf looks like:

upstream decupstream {
server 10.167.1.50:8080;
server 10.160.242.232:8080;
server 10.222.218.126:8080;
}

proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=gop2012:10m;

server {
listen 80;
server_name gop-proxy.mycompany.com;

location / {
proxy_pass http://decupstream;
proxy_cache gop;
proxy_cache_valid 10m;
proxy_cache_use_stale error timeout invalid_header http_500;
proxy_next_upstream error timeout invalid_header http_500;
proxy_cache_lock on;
proxy_ignore_headers Cache-Control Expires;
proxy_set_header Host "gop.mycompany.com";
}
}


How do I get nginx to forward requests to the Apache/PHP servers even if
they don't come in directly to the nginx box?

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

Proxy pass confusion

Jon Drukman August 24, 2012 04:42PM

Re: Proxy pass confusion

Francis Daly August 24, 2012 06:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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