How do I turn the folders/files on my server into a website?
April 21, 2011 9:42 AM

How can I turn the folders on my web server into a browse-able website (without setting up a content management system)?

I'm a graphic designer who has spent a lot of time configuring custom Wordpress themes, setting up databases, etc. etc, and I'm looking for a good alternative to all these complicated content-management systems. Here's roughly what I have in mind:

I'd like a system where I can drop a folder of files onto my server via FTP and then have that folder be instantly browseable in the web browser. For example, if I uploaded five photos and a text file with a short description, I'd like the photos and the text to all appear on a single page when I navigate to that folder's address on my server. No database, no config, just instant publishing.

I've looked at Apache and mod_autoindex, and it's very close to what I want, but I haven't been able to find a way to display the contents of the files rather than the list of files for each folder. I've also looked at Stacey (staceyapp.com) which basically does this, but I'd like something simpler and less specific to portfolios.

Is possible with Apache autoindex configuration? If not, does anyone know if there is a simple PHP app which does this? If not, any suggestions on how I might go about making this myself?

Thanks!
posted by brother to Computers & Internet (7 answers total) 2 users marked this as a favorite
I wrote a little perl script to do something like that, but I had to run it whenever I added new files. Also, it wasn't the kind of thing you'd use for strangers to use to browse your files.
Here it is:
#!/bin/perl
open(IX, ">index.html") or die("Can't open index. $!");
print IX "\n";
while (<>){
print IX "
$_\n";
}
while (<>){
print IX "
$_\n";
}
while (<>){
print IX "
$_\n";
}
while (<>){
print IX "
$_\n";
}
while (<>){
print IX "
$_\n" unless ($_ eq "index.html");
}
print IX "\n";
posted by Obscure Reference at 10:15 AM on April 21, 2011


You might be looking for Coralrift. Haven't used it myself, but it gets good marks on Lifehacker.
posted by CaptApollo at 10:42 AM on April 21, 2011


I found an open source (free to use) one online a couple of years ago that I use, it came with a folder of basic icons, and looks sort of similar to windows explorer.
Example here: www.soundseu.com/dropbox/public

In that folder I left you a zip file that has the php script along with the folder of the icons.

Copyright is held by "Ash Young" and "Manny", not sure who they are, but I feel like I should post that here. When I got it, the idea was that as long as you include the copyright info and their names, you can use it at will.
posted by aloiv2 at 12:03 PM on April 21, 2011


I'm pretty sure if you don't have a .html or .php file in a folder (depending on how your server is set up) it will just display a navigable index of the folder.

Like this web page: http://www.catb.org/
(I have no idea what it is, just the first index I could find).
posted by jander03 at 2:00 PM on April 21, 2011


jander - depends on what your server is. I'm not sure which systems do what, that used to work for me on (I think) a windows based server. When I switched to Godaddy (which was a bad idea) I had to start using the php script to list it.
posted by aloiv2 at 3:17 PM on April 21, 2011


Lussumo Filebrowser does this, it even creates thumbnails and basic galleries for images in a directory. There's a demo here.
posted by clearlydemon at 4:22 PM on April 21, 2011


Awesome, thank you everyone! None of these are exactly what I'm looking for, but they'll give me a good start in putting together something of my own.
posted by brother at 7:14 AM on April 22, 2011


« Older How happy are German cows?   |   Help me debunk Auntie (& Bill Whittle) Newer »
This thread is closed to new comments.