<HTML> <HEAD> <TITLE>doc/webserver</TITLE> <LINK REV="made" HREF="mailto:karrer@iis.ee.ethz.ch"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#990200" VLINK="#006342"><P><IMG SRC="mrtg-l.png"><IMG SRC="mrtg-m.png"><IMG SRC="mrtg-r.gif"></P> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <!-- <UL> <LI><A HREF="#name">NAME</A></LI> <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#apache">APACHE</A></LI> <UL> <LI><A HREF="#configuring mod_expire">Configuring mod_expire</A></LI> </UL> <LI><A HREF="#author">AUTHOR</A></LI> </UL> --> <!-- INDEX END --> <P> <H1><A NAME="name">NAME</A></H1> <P>webserver - hints for web server configuration</P> <P> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> <P>If you want people to actually see the results of your network monitoring efforts you will need a webserver.</P> <P>This document lists some configuration hints for webservers. Contributions welcome.</P> <P> <HR> <H1><A NAME="apache">APACHE</A></H1> <P> <H2><A NAME="configuring mod_expire">Configuring mod_expire</A></H2> <P>A big issue with mrtg monitoring data is the expiery time. All these nice graphs you can create are only valid for a short time. If you do not take special action some webbrowsers will not notice this and you may end up with people seeing old data because of caching issues.</P> <P>The apache module mod_expire allows you to setup special expiery properties for individual file.</P> <P>Here is an example for how this may look for an mrtg web directory. The configuration directives can be stored into a <EM>.htaccess</EM> file.</P> <PRE> ############################################################ # Example .htaccess for use with apache-1.2 and mod_expire. # (mod_expire come with apache-1.2 but you have to explicitly # activate it when compiling the httpd ...) ############################################################# # <Files "*-day.png"> ExpiresActive On # enable expirations # five minutes ExpiresDefault M300 </Files></PRE> <PRE> <Files "*-week.png"> ExpiresActive On ExpiresDefault M1800 </Files></PRE> <PRE> <Files "*-month.png"> ExpiresActive On ExpiresDefault M7200 </Files></PRE> <PRE> <Files "*-year.png"> ExpiresActive On ExpiresDefault M86400 </Files></PRE> <PRE> <Files "*.html"> ExpiresActive On ExpiresDefault M300 </Files></PRE> <PRE> # index.html is not automatically generated <Files "index.html"> ExpiresActive Off </Files></PRE> <P> <HR> <H1><A NAME="author">AUTHOR</A></H1> <P>Unknown</P> </BODY> </HTML>