web server options

Michael Stenner mstenner at phy.duke.edu
Thu Dec 26 16:50:58 EST 2002


On Thu, Dec 26, 2002 at 10:31:35PM +0000, dsavitsk wrote:
> 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.

There are a lot of issues here.  I'll just nibble at one of them.

> 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 NAT will not be an issue.  Most likely, both addresses will have
the same IP address (name-based virtual hosting), in which case, the
question of which domain the client is asking for is handled entirely
within the http spec.  That is, the requestor says "hey, give me
www.bar.com" and so the webserver automatically knows which one to
respond with.

Basically, you'll just need a little Destination NAT to tell the NAT
box "anything coming in on 80 goes to this box over here".  The
webserver will simply see packets coming from the true source.  The
only thing that makes the webserver different from any other old box
is that its routing tables telli it to bounce packets through the NAT
machine.

In short, it's a piece of cake.

> 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 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 know nothing about Twisted or Medusa.  I doubt that Apache would be
too bad, though.  Ultimately, it depends on load, and whether you want
to do other things on the box.  If it's small load (a few hits per
minute) and there's nothing else on the box, I wouldn't even bat an
eye at using apache.

					-Michael
-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner at phy.duke.edu
  Box 90305, Durham N.C. 27708-0305




More information about the Python-list mailing list