0

I have a following deployed scenario.

1x nginx as frontserver for gzip and ssl ofload serving all request to the same server haproxy service listening on 127.0.0.1:8000 to do loadbalancing for three backend IIS webservers.

Now I would like to move all the static content from my backend IIS server (css, jpg, png, js...)to one or two backend Nginx servers, to release working load of IIS.

I guess I have to put another rule for static content on nginx to send to haproxy ACL to forward the requests to 2 or 3 backend nginx servers.

Anyone with the same scenario?

1 Answer 1

2

I found the answer myself. nginx frontend won't do anything. I will use haproxy to do the acl routings...

# Static content
acl url_static path_beg /javascripts /stylesheets /images
acl url_static path_end .jpg .jpeg .gif .png .ico .pdf .js .css .flv .swf
acl host_static hdr_beg(host) -i static0. static1. static2. static3.

use_backend static if host_static or url_static

# Default to dynamic content
default_backend dynamic

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .