Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I configure Apache to ProxyBlock content based on something dynamic such as time-of-day or max-use. Basicly I'm curious about the scriptability of Apache. My web-stumbling leads me to believe I can combine mod-proxy and mod-perl in interesting ways to do dynamic filtering. But I'm pretty lost. What are some general instructions, tutorials, books, technologies to begin scripting Apache (or any suitable proxy).

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Squid is often used for this sort of thing, since it has a language for specifying ACLs that includes support for time of day, as well as a variety of other attributes.

However, if you were wedded to Apache (and I would really recommend Squid for something like this) you could do this with mod_rewrite, a programming RewriteMap, and whatever scripting language you prefer. Use mod_rewrite to create a proxying RewriteRule that uses your script for generating the URL replacement, and then your script can implement whatever logic you want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.