web server options

Mike Meyer mwm at mired.org
Mon Dec 30 00:25:40 EST 2002


"dsavitsk" <dsavitsk at e-coli.net> writes:

> I have a DSL line, a Packard Bell P150/48MB running FreeBSD 4.7, and an itch
> to run a web server.  To that end, I am looking for suggestions on what web
> server to use, and perhaps experiences people may have had.

I'm running FreeBSD 4.6-STABLE on not much more machine than that - a
K6/2-300 with 64MB of memory. You can poke at it on <URL:
http://www.mired.org/ > if you want.

> The things that I need are, (1) the ability to run on the above hardware,
> (2) the ability to serve via python scripts, and (3) the ability to run 2
> distinct servers (i.e. www.foo.com and www.bar.com), both on port 80, on the
> same hardware (the server is behind a NAT box, and I am not sure what sort
> of complications this will bring to this one).

> The options that seem the most promising are Apache2 + mod_python 3, Medusa,
> Twisted.  I am a bit doubtful about Apache on the hardware, and in
> particular mod_python on FreeBSD, but I haven't tried it to be sure (the
> only post online I have seen continually mentioned seg fault...).

I'm not familiar with Twisted. Apache runs fine on my hardware.  I'm
using mod_pyapache rather than mod_python - I couldn't get mod_python
to work, either. I also built apache from sources rather than the
ports tree, to get exactly the modules I wanted compiled in and to
disable everything that I wasn't going to need or didn't want.

> I haven't
> been able to figure out how to use Medusa with 2 servers though I'm sure
> there is a way.  Last, Twisted seems really cool, but I don't know much
> about it and am looking for feedback from someone who has done this and can
> say whether it is a good options or not.

I haven't looked at Medusa in quite a while, so my information may be
out of date. You may have to subclass and extend the server to deal
with virtual hosts, but that should be straightforward. However, if
you're going to be mostly handing out static files with a bit of
scripting, I'd not recommend it. If you're doing mostly dynamic
content, then it is definitely cooler than Apache, and should also
perform reasonably well on the hardware you have.

You might also give a look at wn, which is in the ports tree. It's the
best-written server I've seen (aside from aws, of course :-), is very
secure and performs well in a small environment. You'll be restricted
to writing CGI for python, though.

As a final note, you didn't say how fast the upload speed on the DSL
line is. I wouldn't be at all surprised if the hardware you have can
fill that with static files without working to hard.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list