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

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.


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

..or in a <ProxyMatch>.

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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