title: How to force file download in the browser, nginx server
body: <p>I currently have 2 image locations and they may the formats (jpg,jpeg,png,gif)</p>
  
  <pre><code>i.domain.com/simage.jpg thumbnail
  i.domain.com/image.jpg high quality
  i.domain.com/o/image.jpg full resolution
  </code></pre>
  
  <p>Does anyone know how I can force image files in /o/ to download rather than render in the web browser?</p>
  
  <p>Here's my conf file: <a href="http://pastebin.com/dP8kZMzx">http://pastebin.com/dP8kZMzx</a></p>
  
  <pre><code>#setup subdomain i.domain.com
  server {
      server_name i.domain.com;
      access_log /var/log/nginx/i..com.access.log;
      error_log /var/log/nginx/i.domain.com.error.log;
  
      root /var/www/domain.com/test1/images;
      index index.php index.html index.htm;
  
      #error_page 403 = /notfound.jpg;
      #error_page 500 = /notfound.jpg;
  
      location / {            
          #change this to a 404 img file .jpg
          try_files $uri $uri/ /notfound.jpg;
  
          rewrite  "/s([A-Za-z0-9.]+)?" /small/$1 break;
          rewrite  "/o/([A-Za-z0-9.]+)?" /orig/$1 break;
          rewrite  "/([A-Za-z0-9.]+)?" /medium/$1 break;
      }
  
  }
  </code></pre>