Skip to content

Instantly share code, notes, and snippets.

@kylewm
Created December 20, 2014 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylewm/b8d4aad53d633dad61ff to your computer and use it in GitHub Desktop.
Save kylewm/b8d4aad53d633dad61ff to your computer and use it in GitHub Desktop.
redwind-pilbox-setup
proxy_cache_path /srv/www/kylewm.com/cache keys_zone=one:10m max_size=500m;
...
server {
listen 443 ssl;
server_name kylewm.com;
...
location /imageproxy {
proxy_pass http://localhost:3991/;
proxy_cache one;
proxy_cache_key $scheme$proxy_host$uri$is_args$args;
proxy_cache_valid 200 302 24h;
proxy_cache_valid 400 1h;
add_header X-Proxy-Cache $upstream_cache_status;
add_header X-Proxy-Cache-Key $scheme$proxy_host$uri$is_args$args;
}
location /static {
root /home/kmahan/redwind/redwind;
expires 30d;
}
# support X-SendFile to serve application images directly from nginx
location /internal_data {
internal;
alias /home/kmahan/redwind/redwind/_data;
expires 30d;
}
}
python -m pilbox.app --config=config/default > logs/output.log 2> logs/error.log &
port = 3991
client_key = "REPLACE ME"
# Request related settings
max_requests = 50
timeout = 7.5
# Set default resizing options
background = "ccc"
filter = "antialias"
format = None
mode = "crop"
position = "top"
quality = "90"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment