I am using several instances of Nginx (1.4.1). One as a LoadBalancer and
the
others to host rails applications (using module passenger).
Depending of the url, I forward to the proper backend:
location / {
proxy_pass http://_cluster;
}
But via the proxy, the web page of my application is not correctly
render.
The path to load images files is incorrect and point to the default root
document location.
Direct access to my application is fine so I guess I miss something in
the
load balancer configuration but what ?
Before that when I didn’t need to precise the url in the location
directive,
it worked fine via the load balancer as well.
On Thu, May 30, 2013 at 12:14:09PM -0400, mafious wrote:
Hi there,
Depending of the url, I forward to the proper backend:
location / {
proxy_pass http://_cluster;
}
But via the proxy, the web page of my application is not correctly render.
The path to load images files is incorrect and point to the default root
document location.
I’m not exactly sure what you are reporting.
Is it that your application writes links like “/images/image.png”
instead
of “/myapp/images/image.png”? (In which case: fix your application.)
Or is it that your application writes links like
“/myapp/images/image.png”
and you want the load balancer to serve them from somewhere else? (In
which case: fix your load-balancer config.)
Or is it something else?
The more specific you are with reports like “I do this, I see this,
I expect to see this”, the more chance that someone will be able to
help.