Posts

Simple HTTP server in Perl under xinetd

In this post we'll be looking at very simple impementation of HTTP server written in Perl that is using xinetd system (so called super-server) daemon to handle network connections. It's more prove of concept showing the simple mechanics behind the HTTP protocol, that usually is hidden in some library layer and web server handling all the details for us. To setup new service handler for xinetd you need to add new service description in /etc/xinetd.d directory - in my case the file is called xinetdhttp, but the name of the file does not matter that much since xinetd reads all the files from it's configuration directory to setup services, although it should be descriptive (anyway it's always good idea and practice to give descriptive names to things). service xinetdhttp { socket_type = stream protocol = tcp wait = no user = bob server = /home/bob/xinetdhttp.pl } The last bit missing, before restarting xinetd , is add
Recent posts