-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.conf
60 lines (50 loc) · 1.63 KB
/
dashboard.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
56
57
58
59
60
# Good read
# https://nginx.org/ru/docs/http/ngx_http_proxy_module.html
# https://stackoverflow.com/questions/23844761/upstream-sent-too-big-header-while-reading-response-header-from-upstream
# https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/
server {
listen 80;
listen [::]:80;
server_name dash.example.org;
location / {
add_header Cache-Control "private, max-age=10";
expires 10;
rewrite ^ https://dash.example.org$request_uri? permanent;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name dash.example.org;
keepalive_timeout 60;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/ssl/nginx/dash.example.org.pem;
ssl_certificate_key /etc/ssl/nginx/dash.example.org.pem;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 30;
proxy_cache shared;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
location / {
auth_basic "Dashboard";
auth_basic_user_file /etc/nginx/dashboard_passwd;
proxy_pass http://dashboard;
}
location /healthcheck {
allow 192.168.47.0/24;
allow 192.168.48.0/24;
allow 193.41.76.171;
allow 127.0.0.1;
deny all;
proxy_pass http://dashboard/healthcheck;
}
location /ping {
access_log off;
proxy_pass http://dashboard/ping;
}
}