16/03/10 Proxying A proxy is a program that performs requests on behalf of a client. - runs on an intermediary - acts as both client and server Forward proxies - accepts requests from clients (usually browsers but perhaps other forward proxies) and may forward them to origin servers - responses it receives are forwarded to the original client - close to the client Sharing connections Caching Filtering Anonymization Transforming responses Reverse proxies (surrogates) - placed in front of backend servers - like a forward proxy, it forwards requests to (one of the) backend server(s) and returns results to clients - the outside world sees only one IP address/hostname: clients think of the reverse prxy as if it were an origin server - close to the origin server(s) Performance Security Unified front-end Apache as a proxy Suitable only for small- to medium-scale proxies Modules: mod_proxy and mod_proxy_http Caching? mod_cache and mod_disk_cache and/or mod_mem_cache Directive for forward proxy ProxyRequests On Order Deny,Allow Deny from All Allow from .ucc.ie ProxyBlock www.facebook.com porn ProxyRemote * http://nextproxy.ie Directives for reverse proxy ProxyRequests Off Order Deny,Allow Allow from All ProxyPass /myscripts/ backend1.example.ie ProxyPass /mypages/ backend2.example.ie ProxyPassReverse /mypages/ backend2.example.ie