Created
September 20, 2013 18:57
Revisions
-
johnnyt created this gist
Sep 20, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { #include mime.types; #default_type application/octet-stream; #log_format imageresize '$host $arg_width x $arg_height $arg_url'; #access_log /opt/boxen/homebrew/var/log/nginx/resize.log imageresize; resolver 8.8.8.8; resolver_timeout 30s; sendfile on; keepalive_timeout 65; map $arg_width $width { default 80; ~^[0-9]+$ $arg_width; } map $arg_height $height { default 80; ~^[0-9]+$ $arg_height; } server { listen 80; server_name localhost; root /Users/johnnyt/p/mediaforge/ads_japan; location @missing_image { try_files /empty.png $uri; image_filter resize $width $height; add_header Resize-Status fail; } location /resize { expires off; set $url $arg_url; set_unescape_uri $url; proxy_pass $url; image_filter resize $width $height; add_header Resize-Status success; error_page 404 415 = @missing_image; } location / { root /Users/johnnyt/p/mediaforge/ads_japan; } } }