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.

I am interested if Apache's mod_proxy can be configured to filter the content sent through it. For example, if a user makes a request to site A then send request X to the server otherwise send an unmodified request.

For example:

Client ------> Proxy -------> Server
                |
                |
                   Filter

The filter would be written as a script that gets invoked by the proxy and would also control what kind of response would go on to the server.

Is this even possible? If so, how is this called?

Thank you.

share|improve this question

1 Answer 1

Allowing or blocking sites can be handled in a ProxyBlock..

ProxyBlock bad-site.com other-bad-site.org

..or in a <Proxy>..

<Proxy http://bad-site.com/>
    Order allow,deny
    Deny from all
</Proxy>

..or in a <ProxyMatch>.

<ProxyMatch http://(bad|worse)\-site\.com/.*>
    Order allow,deny
    Deny from all
</ProxyMatch>

For what you're looking for, an outside script handling the authorizations, there is no built-in functionality; you'd probably need a custom module.

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.