1

I created an apt-mirror on Ubuntu Server 16.04 for the purpose of running an offline apt server for local ubuntu clients in the office. I pulled down the latest xenial debs from the main archive, installed apache2, created my symbolic links to the directories but when I try to browse to http://localhost/ubuntu, I get nothing. I can browse to localhost directly and I get the Apache2 splash page, but I can't view the repository subdirectories.

Steps taken:

$apt-get install apt-mirror
$su - apt-mirror /etc/apt/mirror.list
$apt-get install apache2
$ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ /var/www/ubuntu

But when I try to browse http://127.0.0.1/ubuntu, I get "Not Found".

Suggestions? What have I missed? From what I understand, it shouldn't be too hard to setup an apt-mirror.

1

Your link should be directed created at /var/www/html/ubuntu. The default Apache web root directory changed from /var/www to /var/www/html before the release of Ubuntu 14.04.

So your link creation command should be:

ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ /var/www/html/ubuntu

It may be necessary to restart the apache2 service after making this change.

  • There are so many tutorials that still point to the old location, it's an common gotcha to have to avoid. – Arronical Jan 26 '17 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.