server {
  # This serves:
  #   - `apt.cluster` internally.
  #   - `apt.production.alphagov.co.uk` externally.
  server_name apt.*;
  root <%= @root_dir -%>/public;

  access_log /var/log/nginx/apt-access.log timed_combined;
  access_log /var/log/nginx/apt-json.event.access.log json_event;
  error_log /var/log/nginx/apt-error.log;

  location / {
    autoindex on;
  }
}

server {
  # This serves:
  #   - `apt.cluster` internally.
  #   - `apt.production.alphagov.co.uk` externally.
  server_name apt.* apt-origin.*;
  root <%= @root_dir -%>/public;

  access_log /var/log/nginx/apt-access.log timed_combined;
  access_log /var/log/nginx/apt-json.event.access.log json_event;
  error_log /var/log/nginx/apt-error.log;

  location / {
    autoindex on;
  }
}

Add apt-origin.* server_name to Nginx
Add apt-origin.* server_name to Nginx

We're putting Apt mirrors behind Fastly.

It needs to externally respond to requests fired at both apt.production and
apt-origin.production. The first is the hostname which clients connect to;
the second is for the edge to talk to the origin.
