# This is a config file snippet for lighttpd
# 
# Original description:
# It seems rather trivial but lighttpd 1.4 doesn't allow proxy and rewrite at
# the same time, so remapping urls into apt-cacher-ng is trickier than need be
# when used with lighttpd. Also, for users in very restrictive environments,
# opening "funny" ports is not always simple but opening 443/https is well
# understood and can pass review without a glance.

10-apt-cacher-ng.conf:
server.modules   += ( "mod_proxy" )
$HTTP["url"] =~ "^/(ftp.debian.org|security.debian.org|archive.ubuntu.com|security.ubuntu.com)/" {
        proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3142" ) ) )
}
