Click here to show or hide the menubar.

Home >  Archive >  2010 >  August >  17

Previous / Next

An Apache/Dropbox problem
By Dave Winer on Tuesday, August 17, 2010 at 8:40 AM.

Update: I got it working! :-) permalink

I'm trying to do something simple and interesting, but hit a rough spot, and thought I'd ask the brain trust here if you all had any ideas. permalink

The idea: Serve static content out of a Dropbox sub-folder using Apache.  permalink

A picture named apache.gifThe design: I have a new folder at the top level of my dropbox called Apache. Each sub-folder has the name of a domain, say, and 27 others. I have a script watching that folder for the appearance of new folders. When it finds one, it rebuilds my Apache httpd-vhosts.conf file including a mapping of the new domain to the folder in the dropbox hierarchy. Apache then restarts, and voila, I've used Dropbox to configure Apache. Even better, I can copy a new file to any of these folder, or modify an existing file, from any machine that shares this folder and have it instantaneouslly update. It's like Drobox's Public folder, but more more flexible and powerful. permalink

The glitch: While you can control the location of your dropbox, you cannot change its name. It must be My Dropbox. The problem is the space. It's illegal syntax as far as I can tell, in an Apache config file, to have a space in a folder name. Seems there must be some way to escape it, but I don't know it. Or if you know a way to tell Dropbox to use a different named folder, say MyDropbox.  permalink

It's probably obvious, or this may not be the problem. The usual disclaimers apply and any help will be appreciated.  permalink

Followup: Well the first problem was solved, by using double-quotes. Now Apache can parse the name of the folder. But a subsequent problem was revealed. Apache won't serve files that are outside its folder hierarchy. This problem could of course be solved by moving the My Dropbox folder into its hiearchy but this is a bad idea. Most of the stuff in the folder is not intended to be served.  permalink

The obvious solution is to add a Windows shortcut to the Apache hierarchy pointing to the sub-folder of the Dropbox hierarchy that's intended to be served. Nice idea, and I tried it, but Apache doesn't seem to traverse the shortcut. So the next question is this: Apache on Windows and shortcuts -- any hope of them getting along? :-) permalink

Update: Shortcuts don't work, but how about NTFS junctions. Well, try to get one made. Would it be too much trouble to just make a right-click way to do it? Well, yes it would. You have to go to the command line, and it doesn't like filenames with spaces in them either. So I tried to run the Dropbox utility to change the freaking name of the folder, well that didn't work. As a result I'm now re-downloading the whole Dropbox archive into a folder with a space in its name. Well fuck me.  permalink

My software for this fun little project (which is what it was supposed to be) took 15 minutes. Getting Apache, Windows and Dropbox to deal with one freaking space in a folder name, that's taking hours. I should have given up on this long ago. Whats my next step? A bike ride.  permalink

RSS feed for Scripting News
This site contributes to the community river.

© Copyright 1997-2012 Dave Winer. Last update: Tuesday, August 17, 2010 at 8:52 PM Eastern. Last build: 8/26/2012; 5:53:28 PM. "It's even worse than it appears."

RSS feed for Scripting News

Previous / Next