Skip to content

Instantly share code, notes, and snippets.

@urre
Last active Dec 27, 2015
Embed
What would you like to do?
Nginbox: Custom Domain for Dropbox Public Directory
server{
listen 80;
server_name dropbox.urre.me
location / {
set $index index.html;
rewrite ^.*\/$ $fastcgi_script_name$index last;
proxy_pass https://dl.dropboxusercontent.com/u/XXXXXXX/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
@urre

This comment has been minimized.

Copy link
Owner Author

@urre urre commented Oct 31, 2013

  1. Set up domain or sub domain as usual
  2. Save gist as a regular site in /etc/nginx/sites-available/dropbox.urre.me
  3. Symlink to /etc/nginx/sites-enabled/dropbox.urre.me
  4. nginx -s reload
  5. Enjoy nice dropbox public links like http://dropbox.urre.me/rytm.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment