My Time Server's Website Source Page
Perl Shell CSS PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
style.css.gz readme file

This is my timeservers web site's source repository. This repository doesn't contain the code for NTP, but instead the code to run my actual time server website.


This site uses rrdtools to build and display usage graphs. rrdtools is required to be installed on the host server before the graphs may be created.

The below informaion is tailored for Fedora servers, but should be generic enough for most unix/linux systems.

The source for this project may always be found on my github repository:


You may download this project directly from github the current truck may be downloaded as a tar.gz file, or a zip file.

or you can always just download the full git repository:

git clone git://


The requirements for running this project on your own site are pretty simple.

So on a Fedora system, you may run:

yum -y install rrdtools python-markdown


The install proccess for this project at this time is a bit cumbersome. Currently it assumes all files are stored in /var/www/ This will change in the future, but for now, it will be just easiest to create that director on your system.

To install, first you need to add a cron entry for the RRD graphs.

*/5 * * * * <path-to-source>/scripts/do-xntp > /dev/null 2&>1

After adding the cron job, you may add your NTP Servers. To add your NTP servers, start by going into the scripts/ directory. Once in the scripts directory, run the do-newntpstat followed by the name of the computer, similar to below.


Lastly, if you wish to also count the current number of clients per server, run the below to lines.

echo "/usr/bin/perl -w <path-to-source>/scripts/ntpclientsd \
  -dump /var/log/ntpstats/ntp_stats.dump >> /var/log/ntpstats/ntp_stats.log 2>&1 &" >> /etc/rc.local
/usr/bin/perl -w <path-to-source>/scripts/ntpclientsd \
  -dump /var/log/ntpstats/ntp_stats.dump >> /var/log/ntpstats/ntp_stats.log 2>&1 &

Apache Config

yum -y install httpd perl-CGI

The Apache configuration for virtual hosts is pretty simple. The only trick is setting the cgi directory.

<VirtualHost *:80>
    DocumentRoot /var/www/
    CustomLog logs/ combined
    ErrorLog logs/
    <Location /bin>
      Options Indexes FollowSymLinks
      Options +ExecCGI
      Order allow,deny
      Allow from all
      AddHandler cgi-script .cgi

Lighttpd Config

Installing Lighttpd on a Fedora system is pretty simple.

yum -y install lighttpd lighttpd-fastcgi

After Lighttpd is installed, you need to configure it.

server.document-root = "/var/www/" 
server.port = 80

server.username = "www" 
server.groupname = "www" 

mimetype.assign = (
  ".html" => "text/html", 
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png" 

static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )

Rebuilding CSS

To rebuild the css file after modification, download and install the YUI Compressor, then run:

java -jar /yuicompressor-2.4.8pre.jar style.css > style.min.css && gzip style.min.css && mv style.min.css.gz style.css.gz

Yes, it requires Java, but you may always just copy the to style.css and be done


This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <>.