aboutsummaryrefslogtreecommitdiff
path: root/etc/private/install/brep-apache2.conf
blob: 99186d18fc36bf10ad4e77618d69edc6448e710a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Keep in the main server configuration context. This way the directive will
# be in effect during module initialization and request handling.
#
# Note that initialization log messages are written to the main server log
# file (/var/log/apache2/error.log), and request handling messages to the
# virtual server log file (/var/www/brep/log/error.log).
#
LogLevel brep:info

<VirtualHost *:80>
  #ServerName <brep-hostname>
  #ServerAdmin <brep-admin-email>

  #DocumentRoot /var/www/brep/public
  #Options +Indexes

  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE text/manifest
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/css

  Alias "/1" "/var/brep/bpkg/pkg/1"

  ErrorLog /var/www/brep/log/error.log
  CustomLog /var/www/brep/log/access.log combined

  # brep configuration
  #

  # Load the brep module.
  #
  <IfModule !brep_module>
    LoadModule brep_module /home/brep/install/libexec/brep/mod_brep.so
  </IfModule>

  # Repository email. This email is used for the From: header in emails send
  # by brep (for example, build failure notifications).
  #
  #brep-email <brep-admin-email>

  # Repository host. It specifies the scheme and the host address (but not the
  # root path; see brep-root below) that will be used whenever brep needs to
  # construct an absolute URL to one of its locations (for example, a link to
  # a build log that is being send via email).
  #
  #brep-host http://<brep-hostname>

  # Repository root. This is the part of the URL between the host name and the
  # start of the repository. For example, root value /pkg means the repository
  # URL is http://example.org/pkg/. Specify / to use the web server root
  # (e.g., http://example.org/). If using a different repository root, don't
  # forget to also change Location and Alias directives below.
  #
  brep-root /

  <Location "/">
    SetHandler brep

    <IfModule dir_module>
      DirectoryIndex disabled
      DirectorySlash Off
    </IfModule>
  </Location>

  # Brep module configuration. If you prefer, you can paste the contents of
  # this file here. However, you will need to prefix every option with
  # 'brep-'.
  #
  brep-conf /home/brep/config/brep-module.conf

  # Static brep content (CSS files).
  #
  <IfModule !alias_module>
    Error "mod_alias is not enabled"
  </IfModule>

  # Note: trailing slashes are important!
  #
  Alias /@/ /home/brep/install/share/brep/www/

  <Directory "/home/brep/install/share/brep/www">
    Require all granted
  </Directory>

  # brep config override (must come after).
  #
  <LocationMatch "^/([0-9]|icons)(/.*)?$">
    SetHandler none

    DirectoryIndex enabled
    DirectorySlash On
  </LocationMatch>
</VirtualHost>

<Directory /var/brep/bpkg/pkg/>
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>