1

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)?

tshepang
  • 65,642
  • 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 01: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 04:50

6 Answers6

3

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.

phunehehe
  • 20,240
3

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?

skrewler
  • 235
  • I use Debian Squeeze. Also, I just install apache2 which installs whatever apache2-mpm-worker installs, and nothing more. – tshepang Jan 10 '11 at 09: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 04 '11 at 20:42
2

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.

2

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.

0

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>]]

shellholic
  • 6,255
0

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.

  • 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 09 '11 at 18:08