Last active
August 29, 2015 14:10
-
-
Save h0lyalg0rithm/17362c3924d735afbce1 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
resolver 172.16.0.23 valid=300s; | |
resolver_timeout 10s; | |
proxy_cache_path /tmp/cache levels=1:2 keys_zone=S3CACHE:10m inactive=48h max_size=1000m; | |
proxy_temp_path /tmp/cache/temp; | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
try_files $uri @s3cache; | |
} | |
location @s3cache{ | |
proxy_cache S3CACHE; | |
proxy_cache_valid 200 48h; | |
proxy_cache_valid 403 60m; | |
proxy_pass http://<bucket>.s3.amazonaws.com; | |
} | |
} |
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
FROM nginx | |
RUN rm /etc/nginx/conf.d/default.conf | |
COPY default.conf /etc/nginx/conf.d/default.conf | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
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
global | |
log 127.0.0.1 local0 notice | |
maxconn 2000 | |
user haproxy | |
group haproxy | |
listen appname 0.0.0.0:80 | |
mode http | |
stats enable | |
cookie SRVNAME insert | |
balance source | |
option httpclose | |
option forwardfor | |
server server1 <server ip>:80 check | |
server server2 <server ip>:80 check | |
listen stats 0.0.0.0:8080 | |
mode http | |
log global | |
stats enable | |
stats auth admin:password | |
stats uri /haproxy?stats |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment