redirect apt to local repository

Matt Price matt.price at utoronto.ca
Wed Apr 13 19:29:28 UTC 2005


I think I postedo n this a while ago but got no responses.

Using debmirror, I've downloaded a mirror of the hoary repository to
a hard drive.  It works fine in my /etc/apt/sources.list when added
with a "file://" url.  

now, the tricky part.  I wantto deploy this mirror in a classroom
that's not hooked up to the internet.  We will have a bunch of
computers ocnnected to a router (running debian, could be ubuntu if
that makes anything easier, actually haven't set this bit up yet --
any suggestions?), and therefore a local network that I hope will work
fine.  The computers in the network, though, will at some point be
removed from the network and taken into people's homes.  So I would
like to LEAVE sources.list POINTING TO http://archive.ubuntu.com , and
somehow use the router to fool the ocmputers into thinking that they
are connecting to ubuntu when in fact they're accessing my local
repository.


sooo... how would one do this?  first guess:

in /etc/hosts on the router add a line like:

127.0.0.1    archive.ubuntu.com 

in /etc/apache/httpd.conf:

<VirtualHost 127.0.0.1>
    ServerName archive.ubuntu.com
    DocumentRoot /path/to/archive/mirror
</VirtualHost>

does that sound about right?  I guess maybe the individual machines
have to be set to use the router as a DNS server... which means
probably the bit about /etc/hosts is far too simplistic...  

anyway any ideas anyone has are vvvveeeeerrry welcome.

thx,
matt

-------------------------------------------
Matt Price	    matt.price at utoronto.ca
History Department, University of Toronto
(416) 978-2094
--------------------------------------------

The following addresses are for you if you're an evil spambot:
zeus at derailleur.org aardvark at derailleur.org




More information about the ubuntu-users mailing list