ServerName https://kojipkgs.fedoraproject.org
MaxRequestWorkers 512
ServerLimit 512

RequestHeader unset Accept-Encoding early

CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-access.log.%Y-%m-%d 86400" combined
ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-error.log.%Y-%m-%d 86400"

Alias /atomic /mnt/fedora_koji/koji/ostree
Alias /ostree /mnt/fedora_koji/koji/ostree

<Directory /mnt/fedora_koji/koji/ostree>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /atomic-cd /mnt/fedora_koji/koji/atomic-cd

<Directory /mnt/fedora_koji/koji/atomic-cd>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /packages /mnt/fedora_koji/koji/packages
Alias /vol/fedora_koji_archive00/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive00/packages
Alias /vol/fedora_koji_archive01/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive01/packages
Alias /vol/fedora_koji_archive02/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive02/packages
Alias /vol/fedora_koji_archive03/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive03/packages
Alias /vol/fedora_koji_archive04/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive04/packages
Alias /vol/fedora_koji_archive05/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive05/packages
Alias /vol/fedora_koji_archive06/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive06/packages
Alias /toplink/packages /mnt/fedora_koji/koji/packages
Alias /toplink/vol/fedora_koji_archive00/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive00/packages
Alias /toplink/vol/fedora_koji_archive01/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive01/packages
Alias /toplink/vol/fedora_koji_archive02/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive02/packages
Alias /toplink/vol/fedora_koji_archive03/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive03/packages
Alias /toplink/vol/fedora_koji_archive04/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive04/packages
Alias /toplink/vol/fedora_koji_archive05/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive05/packages
Alias /toplink/vol/fedora_koji_archive06/packages /mnt/fedora_koji/koji/vol/fedora_koji_archive06/packages

<Directory /mnt/fedora_koji/koji/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive00/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive01/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive02/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive03/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive04/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive05/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

<Directory /mnt/fedora_koji/koji/vol/fedora_koji_archive06/packages>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /repos-dist /mnt/fedora_koji/koji/repos-dist

<Directory /mnt/fedora_koji/koji/repos-dist>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /repos /mnt/fedora_koji/koji/repos

<Directory /mnt/fedora_koji/koji/repos>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /scratch /mnt/fedora_koji/koji/scratch

<Directory /mnt/fedora_koji/koji/scratch>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /work /mnt/fedora_koji/koji/work

<Directory /mnt/fedora_koji/koji/work>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /mash /mnt/fedora_koji/koji/mash

<Directory /mnt/fedora_koji/koji/mash>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /compose /mnt/fedora_koji/koji/compose

<Directory /mnt/fedora_koji/koji/compose>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /mass-rebuild "/mnt/fedora_koji/koji/mass-rebuild/"

<Directory "/mnt/fedora_koji/koji/mass-rebuild/">
    Options Indexes FollowSymLinks
    Require all granted
</Directory>

Alias /images /mnt/fedora_koji/koji/images

<Directory /mnt/fedora_koji/koji/images>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /rhel /mnt/fedora_koji/rhel

<Directory /mnt/fedora_koji/rhel>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

Alias /pub /pub

<Directory /pub>
    Options Indexes FollowSymLinks
    IndexOptions NameWidth=* FancyIndexing
    FileETag None
    Require all granted
</Directory>

# This IP is sign-bridge01.iad2.fedoraproject.org.
# It needs to be able to sign openh264 packages.
RewriteCond %{HTTP:X-Forwarded-For} !10.3.169.120
RewriteRule ".*/(openh264|mozilla-openh264).*.(x86_64|armv7hl|i686|ppc64|ppc64le|aarch64|s390x).rpm$" "https://fedoraproject.org/wiki/non-distributable-rpms" [R=302,L]

# Set HSTS header via HTTP since it cannot be easily set in squid, which terminates HTTPS
Header always add Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
