-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
45 lines (33 loc) · 1.1 KB
/
nginx.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
server {
listen 443 default_server;
server_name marina.io;
ssl on;
# set HSTS-Header because we only allow https traffic
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
proxy_set_header Host $http_host; # required for Docker client sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location / {
proxy_pass http://app:3000;
}
}
server {
listen 443;
server_name (?<architecture>.+).registry.marina.io;
ssl on;
add_header Strict-Transport-Security max-age=31536000;
chunked_transfer_encoding on;
client_max_body_size 0;
access_log /dev/stdout;
location /v2/ {
auth_request /_auth;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
proxy_pass http://registry$architecture:5000;
proxy_redirect off;
}
}