General discussion

Locked

Build a simple Web server

By Mark W. Kaelin Editor ·
Build a simple Web server with the HTTP:aemon module:

The May 6, Perl TechMail discusses how to build a simple Web server using the HTTP:aemon module. Will you use this technique for creating a Web server? Tell us how you plan to use it--or tell us why not.

If you haven't subscribed to the Perl TechMail, there is no better time to take advantage of our free e-newsletter. Visit our e-newsletter subscription center to subscribe to this valuable TechMail today:

http://builder.com.com/techmails.jhtml?repID=u001

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

how do i get it to work?

by manny In reply to Build a simple Web server

i pasted the code to a .pl file and executed it from dos and it said 'server open at...' but when i type the address shown (with or without the port number), i get 'cannot find server' error!

Collapse -

It works for me!

by James Brown In reply to how do i get it to work?

When I run the code straight from the email I get the following:
Server open at http://localhost:1234/
127.0.0.1:3694 Connected
127.0.0.1:3694 Requested GET /
127.0.0.1:3694 Closed

I put the full server address (http://locahost:1234/) in my browser's (IE 5) URL line. It seemed to work fine. I got back the simple result page.

A couple of thoughts:
First, did you account for the long lines in the email that may have been wrapped? Depending on your mail client, it may have wrapped one or more lines.

Second, are you sure you have the latest versions of the three modules? Be sure you have current versions of HTTP:aemon, HTTP::Status and HTTP::Response.

What platform are you running on? I'm using a Win 2K box with ActiveState Perl v5.6.1.

Collapse -

it still does not work

by manny In reply to It works for me!

this is the perl install file i downloaded from activeperl:
ActivePerl-5.6.1.633-MSWin32-x86.msi
(i assume all the accompanying modules are current)

my box is also win 2k
i had un-wrapped the wrapped lines.
it prints the "Server open at.." message only so it must be hanging at the $daemon->accept method

Collapse -

anas online

by a9000n In reply to Build a simple Web server

Welcom to my new hom pag

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums