Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Perl webserver

by martymart (Deacon)
on Aug 19, 2003 at 10:12 UTC ( [id://284837]=perlquestion: print w/replies, xml ) Need Help??

martymart has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks,

I'm trying to find a webserver that's written in Perl. I know this could be done with HTTP::Daemon, but unfortunately I have no knowledge of this type of module (actually if anybody knows of a good tutorial or introduction to using perl daemons/Sockets that would be great -- it would be better still if a wise monk added such information to the tutorials section of perlmonks maybe!!) What I am looking for should be something similar to TinyWeb (i.e. supports basic logs and running cgi scripts). If anybody could point me in the right direction I'd appreciate it.
Basically, I have perl installed on an old machine with very limited space, and I just want a bare bones webserver. Is perl suited to this kind of task?

Many Thanks
Martymart

Replies are listed 'Best First'.
Re: Perl webserver
by larsen (Parson) on Aug 19, 2003 at 10:16 UTC
Re: Perl webserver
by valdez (Monsignor) on Aug 19, 2003 at 10:23 UTC

    I think a bare bones Apache would be better: it's smaller and safer.

    Ciao, Valerio

      I'll second this. I once prototyped a message server in Perl and then rewrote it in C - the C version was at least an order of magnitude faster, and used considerably less memory. Of course, the C version was leaner in design partly because it is so much work to do _anything_ in C, but still... The point is, vanilla Apache takes up less than 2Mb and is fast, efficient, and well-tested.
Re: Perl webserver
by bm (Hermit) on Aug 19, 2003 at 11:29 UTC
    I don't know if this will be small enough for you, but IndigoPerl contains Apache and Perl 5.8, plus a whole heap of non-core, web related modules (like Encode and XML::**) for the Win32 platform.
    --
    bm
Re: Perl webserver
by dree (Monsignor) on Aug 19, 2003 at 14:38 UTC
Re: Perl webserver
by Zeroth (Beadle) on Aug 19, 2003 at 10:21 UTC
    A search on cpan gave me this: HTTPi
    It doesn't seem to support cgi though.
Re: Perl webserver
by DigitalKitty (Parson) on Aug 20, 2003 at 08:14 UTC
    actually if anybody knows of a good tutorial or introduction to using perl daemons/Sockets that would be great

    Hi martymart.

    One of the finest perl related books I own is:

    Title:Network Programming with Perl
    ISBN:0201615711
    Price:$49.99


    Hope this helps,
    -Katie
Re: Perl webserver
by strat (Canon) on Aug 20, 2003 at 08:59 UTC
    You might find the following links helpful:
    POE -> Web Server or Web Server With Components or Web Server With Forking or Web Stream Server
    The example on Poor man's webchat from merlyn gave me a good startup with Http::Daemon

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Re: Perl webserver
by CountZero (Bishop) on Aug 19, 2003 at 21:14 UTC

    Why not trying Apache 2? It is not that large and you can customize it with Perl (through mod_perl). There is a great "works right out of the box" package to be found at Apachefiends.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://284837]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-23 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found