pagespeed/ngx_pagespeed — pull request #81 by jeffkaufman (2012-11-26 18:47:38+00:00)
Title: configuration: handle multi-layer configuration

Nginx allows configuration at three levels:
- main
- server
- location

Previously we did everything at the server level, which made for a few problems:
- we didn't support options in location blocks
- we created an NgxRewriteDriverFactory for every server block, which when
combined with the Serf fetcher meant we had separate fetch pools for every
server. If someone had nginx configured with a lot of server blocks, we
could attempt far too many simultaneous loopback fetches and DOS ourself.

Now we store things at several levels:
- main
- rewrite driver factory
- server
- most things
- location
- directory specific options

For now we don't detect when an option is set at the location-level that should only be set at the server level.