[time] httpd redirects

Nick Warne nick
Thu Oct 7 21:16:31 UTC 2004


Hi all,

I would like to add to what is on the destructions on the main page.

I also run a domain on my time server, so needed _only_ to redirect 
pool.ntp.org requests... not every request, but as both are on same IP, it 
took me some sussing (maybe other people too).

Here is what I had to do:

==============================

# Virtual host Default Virtual Host

<VirtualHost xxx.xxx.xxx.xxx:80>   # xxx.xxx.xxx.xxx == your IP.

 *Your server details here that are
 not defined in main httpd settings.*

</VirtualHost>

# pool.ntp.org redirects for when people query timeserver via browser.

NameVirtualHost xxx.xxx.xxx.xxx:80    # xxx.xxx.xxx.xxx == your IP as above.

<VirtualHost xxx.xxx.xxx.xxx:80>   # xxx.xxx.xxx.xxx == your IP as above.
        ServerName pool.ntp.org
        ServerAlias uk.pool.ntp.org
        Redirect Permanent / http://www.pool.ntp.org
        LogFormat "%h %v %l %u %t \"%r\" %>s %b" comonvhost
        CustomLog /var/log/httpd/accessvhost_log comonvhost
</VirtualHost>

==============================

It also includes how to log such request too.

Maybe will help?

Nick


-- 
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."


More information about the pool mailing list