mod_daytime 0.01 review
Downloadmod_daytime Apache module is a RFC-867-compliant Daytime service. Multi Protocol Support is one of the most important new features
|
|
mod_daytime Apache module is a RFC-867-compliant Daytime service.
Multi Protocol Support is one of the most important new features in Apache 2: The server is able to handle other TCP network services than just HTTP. As an example, the default distribution of Apache 2 HTTPD contains the mod_echo module that implements the Echo protocol. This standard TCP service answers any request by returning its complete contents. As a result, it can be helpful in testing network connections.
Based on the source code of mod_echo, I have written the mod_daytime module. It implements the Daytime Service according to RFC 867. This service answers any request by sending the current date and time. The RFC doesn't specify a format; this implementation is using ctime(3).
It is usually recommended to create a virtual host that works as a Daytime server exclusively. You might configure it for TCP port 13 on which the Daytime Service listens by default. The configuration to achieve that looks like this:
# Listen on Port 13
Listen 13
< VirtualHost *:13 >
ProtocolDaytime On
< /VirtualHost >
The first thing you need to do, however, is compile the source code provided here. On a UNIX system where Apache 2 has been installed with DSO support, you can simply type the following command (as root):
# [/path/of/apache/bin/]apxs -cia mod_daytime.c
This will create the DSO file mod_daytime.so, copy it into the Apache installation's /modules directory, and add the following directive for loading the module to httpd.conf:
LoadModule daytime_module modules/mod_daytime.c
mod_daytime 0.01 search tags