Author Topic: Dropbox is my publish button; easy publishing using Dropbox, Nginx config within  (Read 286 times)

Pinako

  • Hero Member
  • *****
  • Posts: 1263
    • View Profile
    • inportb
I think it's fun to use Dropbox as part of the Web hosting stack. Hardcore Internet users might prefer to rsync, but it's convenient to be able to directly edit your files and have them automatically published, moments later. I did a write-up of my technique, which is itself a live demonstration.


Here's my current Nginx configuration:
Code: [Select]
server {
listen  80;
server_name dl.inportb.com;
location /static/images/psychobox.png {
rewrite . http://dl.dropbox.com/static/images/psychobox.png;
}
location / {
rewrite ^(.*?)/$ $1/index.md.htm;
if ($uri ~* "\.md\.htm$") {
rewrite ^/.*?\.md\.htm$ /render_md.htm;
}
if ($uri !~* "\.(?:htm|html|md)$") {
rewrite ^/(.*)$ http://dl.dropbox.com/u/1213413/htdocs/$1 break;
}
proxy_pass http://dl.dropbox.com/u/1213413/htdocs/;
}
}