Also keep in mind that all web addresses are relative to the root of the web server.
#used to redirect client to new localtion of file
$address="http:///your.address/dir";
#location of wget used to get files
$wgetlocation = "/usr/bin/wget";
#switches passed to wget
$wgetswitches = "-nc -c -t 5 --passive-ftp ";
#directory to put the new dist files in
$wgetputdir = "/var/www/localhost/htdocs/distfiles";
$distdir = "distfiles/";
#mirrors to use to get the gentoo files from
@mirrors = ("
ftp://ibiblio.org/pub/Linux/distributions/gentoo/","
ftp://mirror.iawnet.sandia.gov/pub/gent ... ccccom.com","
http://128.213.5.34/gentoo/");
$address, $distdir are relative paths
$wgetlocation, $wgetputdir are absolute paths
You might notice that $distdir isn't needed, so you don't need to configure it. I'm not sure why I left it in the script.
$address should be configured with the web address the client will use for trying to download the file. You can test this w/ a web browser.
$wgetputdir is the location wget puts the files it downloads. So if a client requests
http://127.0.0.1/gentoo-files/x.y.z.tar.gz then wget will download the file into the $wgetputdir directory.
Example:
$address =
http://127.0.0.1/distfiles
$wgetputdir = /var/www/localhost/htdocs/distfiles
One last note, you need to change the @mirrors servers to the servers that are the fastest for you. These servers may not be the quickest, they're just default servers I plucked from the /etc/make.conf