Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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?

share|improve this question
up vote 2 down vote accepted

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.