Created
April 3, 2009 04:00
-
-
Save mariuz/89628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name www.example.com; | |
# serve static files | |
location ~ ^/(img|images|javascript|js|css|flash|media|static)/ { | |
root /var/www/www; | |
# expires 30d; | |
} | |
location / { | |
proxy_pass http://foobar_balancer; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_redirect false; | |
} | |
gzip_min_length 1000; | |
gzip_types text/html text/plain text/css text/javascript application/x-javascript text/xml; | |
} | |
upstream foobar_balancer { | |
server copycat1.example.com:8000; | |
server copycat2.example.com:80; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment