httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Subject Re: [users@httpd] Static/Dynamic content caching module
Date Tue, 17 Jun 2003 11:02:41 GMT


On Tue, 17 Jun 2003, Noor Dawod wrote:

> I am searching for an Apache module tha can cache dynamic and static
> content? It must be for Apache 1.3.x.
> I know about "mod_rewrite" and that I can use it, as written in the
> module's page, but it's like using a gunshot to kill a bird.

I usually use mod_proxy.

Below; /foo-real/ is the URI under which the normal content is available;
/foo/ is how it appears cached. Modify as appropritate.

                # Location of the cahce
                #   mkdir -p /bigspace/foo/cache
                #   chown www:www /bigspace/foo/cache
		#
                CacheRoot /bigspace/foo/cache

                # Max size in Kilobytes
                CacheSize 604800

                # Override max caching periods
                # specified in hours.
                # CacheMaxExpire        24

		# Map /foo/ into the the real location.
		#
                ProxyPass       /foo/ http://127.0.0.1/foo-real/

                # Next make sure that your proxy cannot be used
                # by third parties as a hacking/anonymizer platform.
                #
                <Directory proxy:*>
                        deny from all
                </Directory>

                <Directory proxy:http://127.0.0.1/foo-real/*>
                        allow from 127.0.0.1
                </Directory>

		DocumentRoot ....../foo-real
		<Directory ...../foo-real>
			order deny,allow
			deny from all
			allow from 127.0.0.1

			....
		</Directory>

See http://httpd.apache.org/docs/mod/mod_proxy.html  for more detail.

Dw.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message