From 195fe0ed026e99e406c60e3e8392268648c449c5 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 11 Apr 2005 21:14:28 +0000 Subject: Do .htaccess expiry stuff --- web/latency/Makefile.am | 10 ++++++++-- web/load/Makefile.am | 11 ++++++++--- web/tls/Makefile.am | 4 +++- 3 files changed, 19 insertions(+), 6 deletions(-) (limited to 'web') diff --git a/web/latency/Makefile.am b/web/latency/Makefile.am index e85adf5..a0f5521 100644 --- a/web/latency/Makefile.am +++ b/web/latency/Makefile.am @@ -20,14 +20,20 @@ result/stats.txt: $(ECHOLOT_BASE)/results/thesaurus/index.txt $(ECHOLOT_BASE)/da echo "** Skipping Latency build"; \ fi + echo "ExpiresActive On" > result/.htaccess + echo "ExpiresByType image/png \"modification plus $(LATENCY_AGE) seconds\"" >> result/.htaccess + echo "ExpiresByType text/html \"modification plus $(LATENCY_AGE) seconds\"" >> result/.htaccess + clean: rm -rf result tmp install-data-local: result/stats.txt [ -d $(docdir) ] || mkdir $(docdir) - cp result/*.png $(docdir) - cp result/*.html $(docdir) + cp -a result/*.png $(docdir) + cp -a result/*.html $(docdir) + cp -a result/.htaccess $(docdir) uninstall-local: rm -f $(docdir)/*.png rm -f $(docdir)/*.html + rm -f $(docdir)/.htaccess diff --git a/web/load/Makefile.am b/web/load/Makefile.am index 5b11ded..232b9bd 100644 --- a/web/load/Makefile.am +++ b/web/load/Makefile.am @@ -6,7 +6,6 @@ include $(top_srcdir)/Makefile.common doc_DATA = result/index.html result/index.html: $(ECHOLOT_BASE)/results/thesaurus/index.txt $(ECHOLOT_BASE)/data $(ECHOLOT_BASE)/data/* - $(top_srcdir)/bin/load-update $(ECHOLOT_BASE) $(LOAD_RRD_DIR); \ [ -d result ] || mkdir result if [ -e $@ ] ; then \ mod=`stat -c '%Y' $@`; \ @@ -20,14 +19,20 @@ result/index.html: $(ECHOLOT_BASE)/results/thesaurus/index.txt $(ECHOLOT_BASE)/d echo "** Skipping Load build"; \ fi + echo "ExpiresActive On" > result/.htaccess + echo "ExpiresByType image/png \"modification plus $(LOAD_AGE) seconds\"" >> result/.htaccess + echo "ExpiresByType text/html \"modification plus $(LOAD_AGE) seconds\"" >> result/.htaccess + clean: rm -rf result install-data-local: result/index.html [ -d $(docdir) ] || mkdir $(docdir) - cp result/*.png $(docdir) - cp result/*.html $(docdir) + cp -a result/*.png $(docdir) + cp -a result/*.html $(docdir) + cp -a result/.htaccess $(docdir) uninstall-local: rm -f $(docdir)/*.png rm -f $(docdir)/*.html + rm -f $(docdir)/.htaccess diff --git a/web/tls/Makefile.am b/web/tls/Makefile.am index c18b2af..71e311c 100644 --- a/web/tls/Makefile.am +++ b/web/tls/Makefile.am @@ -31,7 +31,9 @@ clean: install-data-local: index.html [ -d $(docdir) ] || mkdir $(docdir) - cp cert-*.txt $(docdir) + cp -a cert-*.txt $(docdir) + ! [ -f .htaccess ] || cp -a .htaccess $(docdir) uninstall-local: rm -f $(docdir)/cert-*.txt + rm -f $(docdir)/.htaccess -- cgit v1.2.3