34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
worker_processes 1;
|
|
events { worker_connections 512; }
|
|
http {
|
|
access_log off;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
client_max_body_size 16m;
|
|
server {
|
|
listen 4317 ssl;
|
|
http2 on;
|
|
ssl_certificate /tls/server.crt;
|
|
ssl_certificate_key /tls/server.key;
|
|
ssl_client_certificate /tls/ca.crt;
|
|
ssl_verify_client on;
|
|
if ($ssl_client_s_dn !~ "^CN=lab7-telemetry-(collector)$") { return 403; }
|
|
location = /opentelemetry.proto.collector.trace.v1.TraceService/Export {
|
|
limit_except POST { deny all; }
|
|
grpc_pass grpc://127.0.0.1:14317;
|
|
}
|
|
location / { return 403; }
|
|
}
|
|
server {
|
|
listen 16686 ssl;
|
|
ssl_certificate /tls/server.crt;
|
|
ssl_certificate_key /tls/server.key;
|
|
ssl_client_certificate /tls/ca.crt;
|
|
ssl_verify_client on;
|
|
if ($ssl_client_s_dn !~ "^CN=lab7-telemetry-(grafana)$") { return 403; }
|
|
location /api/ {
|
|
limit_except GET { deny all; }
|
|
proxy_pass http://127.0.0.1:16687;
|
|
}
|
|
location / { return 403; }
|
|
}
|
|
} |