-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmt-server-http.conf
55 lines (46 loc) · 1.57 KB
/
rmt-server-http.conf
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
upstream rmt {
server rmt-server:4224;
}
server {
listen 80 default;
server_name rmt;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /usr/share/rmt/public;
location / {
# RMT accepts registrations over HTTP and HTTPS by default.
# If you want to block registrations over HTTP, you can comment out the following try_files line to support HTTPS only.
try_files $uri/index.html $uri.html $uri @rmt_app;
autoindex off;
}
location /repo {
autoindex on;
}
location = /repo/repoindex.xml {
# RMT serves /repo/repoindex.xml over HTTP and HTTPS by default.
# If want to block it over HTTP, you can comment out the following try_files line and uncomment the return
# statement to redirect all HTTP requests to HTTPS.
try_files $uri @rmt_app;
# return 301 https://$host$request_uri;
}
location /suma {
autoindex on;
}
location @rmt_app {
proxy_pass http://rmt;
proxy_redirect off;
proxy_read_timeout 600;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
# An alias to RMT CA certificate, so that it can be downloaded to client machines.
location /rmt.crt {
alias /etc/rmt/ca/rmt-ca.crt;
}
# For livenessProbe
location /index.html {
alias /srv/www/htdocs/index.html;
}
}