Hosting APT repository on Windows using IIS?

Posted on

A server stack is the collection of software that forms the operational infrastructure on a given machine. In a computing context, a stack is an ordered pile. A server stack is one type of solution stack — an ordered selection of software that makes it possible to complete a particular task. Like in this post about Hosting APT repository on Windows using IIS? was one problem in server stack that need for a solution. Below are some tips in manage your windows server when you find problem about windows, iis, apt, , .

I have created Basic apt repository(with just one folder) witch works on windows. Then i took more standard way of creating apt repository(with pool and dists folders) but when i transfer it to windows it doesn’t work. I get error 404, but when that exact copy is used on linux it is working ok. Any tip?

After that i set MIME in ISS to .* as application/octet-stream, but after that i get:

    Nap:3 repositorylink stable InRelease              
  406  Not Acceptable

“406 Not Acceptable” is referencing a client issue by the apt client side. So add to your apt.conf:
Debug::Acquire::Http “true”;

You might then see Host headers something like this:

Host: 127.0.0.1
Cache-Control: max-age=0
Accept: text/*
If-Modified-Since: Thu, 23 Apr 2020 07:06:32 GMT
User-Agent: Debian APT-HTTP/1.3 (2.0.2ubuntu0.1)

This is saying the Release file is expecting “text/*” not “application/octet-stream”

If you have configured a default in IIS for “application/octet-stream” then it will fail with the error you are seeing. Change it to “text/plain” instead and you should get further.

Also if you use a virtual directory it appears you need to recreate the catch-all mime-type under the virtual directory as well as it doesn’t seem to be inherited.

Leave a Reply

Your email address will not be published. Required fields are marked *