Nifty Dropbox Trick

clipped from www.imbrandon.com

Simplify Dropbox URL’s with Apache2 (reverse)proxy

April 6th, 2009

First off this is a (late) response to Christer Edwards way of simplifying his public Dropbox URL’s  with .htaccess and mod_rewrite, it can be found here.

While his solution works, it leaves the URL ugly e.g. a Picture of my son and his toy duck at would redirect to http://dl.getdropbox.com/u/461492/eric-n-duck.jpg . Below is my solution to the “problem”. Simply setup apache2 as a reverse proxy for your public folder on Dropbox.

Here is the sample config I use on http://storage.imbrandon.com/ , its just a couple of added lines to your vhost/httpd.conf ( change the number after the /u/ to your Dropbox user ID number ).

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass /dropbox http://dl.getdropbox.com/u/461492/
ProxyPassReverse /dropbox http://dl.getdropbox.com/u/461492/

So now when you visit http://storage.imbrandon.com/dropbox/eric-n-duck.jpg the URL never changes.

Advertisements

About this entry