Skip to content
Snippets Groups Projects

helm: Use Apache instead of nginx to serve our static repo files (sync collabora/production from collabora/staging)

Merged Emanuele Aina requested to merge collabora/staging into collabora/production
3 files
+ 76
20
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -5,19 +5,65 @@ metadata:
@@ -5,19 +5,65 @@ metadata:
labels:
labels:
{{- include "aptly.labels" . | nindent 4 }}
{{- include "aptly.labels" . | nindent 4 }}
data:
data:
default.conf: |
httpd.conf: |
server {
ServerRoot "/usr/local/apache2"
listen 80 default_server;
Listen 80
listen [::]:80 default_server;
{{ .Values.publish.config.before_modules | indent 4 }}
#access_log /var/log/nginx/host.access.log main;
LoadModule mpm_event_module modules/mod_mpm_event.so
location ~ /apertis/dists/(?<dist>[^/]+)/snapshots/latest\.txt$ {
LoadModule authz_core_module modules/mod_authz_core.so
resolver kube-dns.kube-system.svc.cluster.local;
LoadModule allowmethods_module modules/mod_allowmethods.so
proxy_pass http://{{ include "aptly.fullname" . }}-latest-snapshots.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.latestSnapshots.service.port }}/latest/$dist;
LoadModule reqtimeout_module modules/mod_reqtimeout.so
}
LoadModule mime_module modules/mod_mime.so
location / {
LoadModule log_config_module modules/mod_log_config.so
root /data;
LoadModule headers_module modules/mod_headers.so
autoindex on;
LoadModule proxy_module modules/mod_proxy.so
try_files $uri $uri/ =404;
LoadModule proxy_http_module modules/mod_proxy_http.so
}
LoadModule unixd_module modules/mod_unixd.so
}
LoadModule dir_module modules/mod_dir.so
 
LoadModule autoindex_module modules/mod_autoindex.so
 
{{ .Values.publish.config.after_modules | indent 4 }}
 
 
<IfModule unixd_module>
 
User www-data
 
Group www-data
 
</IfModule>
 
 
ErrorLog /proc/self/fd/2
 
LogLevel warn
 
 
<IfModule log_config_module>
 
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" common
 
CustomLog /proc/self/fd/1 common
 
</IfModule>
 
 
<IfModule headers_module>
 
RequestHeader unset Proxy early
 
</IfModule>
 
 
<Directory />
 
AllowOverride none
 
Require all denied
 
</Directory>
 
 
DocumentRoot /data
 
<Directory /data>
 
AllowMethods GET
 
AllowOverride none
 
Require all granted
 
Options +Indexes
 
AddDefaultCharset utf-8
 
</Directory>
 
 
define SNAPSHOTS_SERVICE "{{ include "aptly.fullname" . }}-latest-snapshots.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.latestSnapshots.service.port }}"
 
<LocationMatch "^/apertis/dists/(?<dist>[^/]+)/snapshots/latest\.txt$">
 
AllowMethods GET
 
ProxyPassMatch "http://${SNAPSHOTS_SERVICE}/latest/$1"
 
ProxyPassReverse ${SNAPSHOTS_SERVICE}
 
</LocationMatch>
 
 
<IfModule mime_module>
 
TypesConfig conf/mime.types
 
</IfModule>
 
 
{{ .Values.publish.config.after_body | indent 4 }}
Loading