Below is my load balancing configuration.my other servers contain nginx unicorn based application setup. When i tried above configuration the images are not loading. I have total three servers 1 for load balance and other 2 for applications. can some one help me with this. I am totally struck on this.
upstream backend {
server ws1.10.10.1.1 fail_timeout=10;
server ws2.10.10.1.2 fail_timeout=5;
}
server {
listen 80;
client_max_body_size 2G;
server_name staging.xxxx.com;
include /etc/nginx/mime.types;
default_type application/octet-stream;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X_FORWARDED_PROTO $scheme;
proxy_set_header Host $host;
proxy_connect_timeout 3;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_redirect false;
proxy_max_temp_file_size 0;
if (!-f $request_filename) {
proxy_pass http://backend;
}
}
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ { }
}