Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In my set-up, I run (as root) ln -s ~/share /var/www. By doing this, anyone on the local network will access the ~/share directory by pointing their browsers at http://hostname/share. I use apache, but I suspect that it's overkill (memory usage) for this simple use.

What alternative light-weight web servers can I use for this? Will it also be tinker-free (in Debian, there's no extra set-up for apache, beyond installation)?

share|improve this question
    
how little memory do you have? I suspect with the next to no use the server will receive, it doesn't really matter how light/heavy? –  xenoterracide Jan 10 '11 at 1:48
    
I'm not even running short, but then again, I don't burn money just because I'm a billionaire. Also, I do think it matters, because it's likely that the bigger the httpd, the longer it takes to start. –  Tshepang Jan 10 '11 at 4:50
add comment

6 Answers

up vote 3 down vote accepted

You will have a long list for this. At my workplace we have Cherokee instead of Apache. Cherokee has a nice web admin interface that makes configuration really easy.

I also heard about Nginx and lighttpd.

share|improve this answer
    
Cherokee looks good. I also like how it displays the icons. –  Tshepang Jan 9 '11 at 18:41
add comment

Lighthttpd is lightweight and easy to setup. nginx seems to be the more popular choice nowadays, tho.

It really isn't going to make much of a difference either way. I'd just stick with Apache, if you want to tweak it to use less memory try apache2-mpm-worker.

sudo aptitude install apache2-mpm-worker

Also, since you want all this stuff working 'out of the box', what version Debian are you running?

share|improve this answer
    
I use Debian Squeeze. Also, I just install apache2 which installs whatever apache2-mpm-worker installs, and nothing more. –  Tshepang Jan 10 '11 at 9:04
1  
I'm not sure I understand your comment. Apache2 uses mpm_prefork by default which is single threaded and so uses more memory. –  skrewler Jan 10 '11 at 11:11
    
In Debian, apache2 is a meta-package that depends on apache2-mpm-worker or apache2-mpm-prefork or apache2-mpm-event or apache2-mpm-itk, in that order. That is, running apt-get install apache2 will pull in apache2-mpm-worker, and if it's not available, will go on to the next one, and so on. –  Tshepang Feb 4 '11 at 20:42
add comment

You could try thttpd. It's very lightweight, uses very few resources. It does have some slightly odd policies about file access as I recall.

share|improve this answer
    
requires some tinkering --> didn't work out-of-the-box –  Tshepang Jan 9 '11 at 18:04
add comment

nginx (pronounced Engine-X) is a very popular lightweight alternative for serving static (and other) content. It works out of the box on most distributions.

share|improve this answer
1  
requires some tinkering --> didn't work out-of-the-box –  Tshepang Jan 9 '11 at 18:38
add comment

for temporary share, I have this shell script in my path:

#!/usr/bin/env bash

PORT=${1:-8000}
DIR=${2:-\.}

cd "$DIR"
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()" $PORT

By default, shares the current directory on port 8000, syntax is scriptname [<port> [<dir>]]

share|improve this answer
    
I can't help wondering, will the Python module SimpleHTTPServer allow concurrent file sharing? Last time I checked it didn't seem to. –  phunehehe Jan 9 '11 at 16:46
    
@phunehehe if you want concurrency, try this stackoverflow question but if you go so far, keep apache, add mod_userdir, even like that it will be lighter. –  shellholic Jan 9 '11 at 16:56
add comment

Debian packages that provide a web server provide the httpd package. Just about anything in there that isn't a version of Apache is a lightweight web server.

share|improve this answer
    
I went through that list, and it was what-a-waste-of-time (some of the stuff is hardly maintained, some isn't tinker-free), that's why I asked for specific recommendations. –  Tshepang Jan 9 '11 at 18:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.