13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 23<br />

mod proxy<br />

mod proxy implements a simple caching proxy server on <strong>to</strong>p of <strong>Apache</strong>. We’ll consider caching, and proxying,<br />

and <strong>the</strong>n talk more generally about how this can be used.<br />

There’s a significant difference between mod proxy on <strong>Apache</strong> 1.3 and 2.0. On 1.3,<br />

proxying and caching are both provided by mod proxy, but in 2.0 <strong>the</strong>se are separate<br />

modules. Additionally, <strong>the</strong> directive in 2.0 replaces <strong>the</strong> ra<strong>the</strong>r less intuitive<br />

syntax in 1.3. If you are going <strong>to</strong> do proxying on 1.3, you’ll<br />

need <strong>to</strong> consult <strong>the</strong> documentation for o<strong>the</strong>r nuances.<br />

23.1 Caching<br />

ProxyRequests On<br />

CacheRoot /usr/local/apache/proxy<br />

Make sure that <strong>the</strong> specified direc<strong>to</strong>ry is owned/writable by nobody.<br />

In your browser, you will need <strong>to</strong> configure your proxy server <strong>to</strong> point <strong>to</strong> <strong>the</strong> new caching proxy server.<br />

When you make requests, <strong>the</strong>y will get logged in <strong>the</strong> <strong>Apache</strong> access log, and retrieved files will be cached in<br />

<strong>the</strong> specified direc<strong>to</strong>ry.<br />

S<br />

ecurity concerns regarding cache poisoning. Talk about <strong>the</strong> naming convention for files,<br />

and how files could be subverted.<br />

145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!