mirror of
https://github.com/logos-co/nomos.git
synced 2026-08-27 09:31:15 +00:00
95 lines
2.7 KiB
Plaintext
95 lines
2.7 KiB
Plaintext
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
map $http_authorization $is_otlp_authorized {
|
|
default 0;
|
|
include /node-data/tracing/otel_tokens.map;
|
|
}
|
|
|
|
# Public
|
|
server {
|
|
listen 13000;
|
|
server_name _;
|
|
|
|
# Block Explorer
|
|
location /explorer/ {
|
|
rewrite ^/explorer/(.*)$ /web/explorer/$1 break;
|
|
proxy_pass http://explorer:8000;
|
|
proxy_set_header Host $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 $scheme;
|
|
# Stream api related.
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_cache off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 86400s;
|
|
}
|
|
|
|
# Faucet mapping from outside to internal docker net.
|
|
location /faucet-backend/ {
|
|
proxy_pass http://faucet:18090/faucet/;
|
|
}
|
|
|
|
# Otlp http collector for external nodes.
|
|
location /otlp/ {
|
|
if ($is_otlp_authorized = 0) {
|
|
return 401 '{"error": "Unauthorized"}\n';
|
|
}
|
|
|
|
proxy_pass http://otel:4318/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# OTLP payloads can be large; prevent Nginx from blocking them.
|
|
client_max_body_size 20M;
|
|
}
|
|
|
|
# Static content on https://$EVN_TITLE_STRING.blockchain.logos.co/web/.
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|
|
|
|
# Protected
|
|
server {
|
|
listen 13001;
|
|
server_name _;
|
|
|
|
# Filebrowser Web UI
|
|
location /filebrowser/ {
|
|
proxy_pass http://filebrowser:80/;
|
|
|
|
proxy_set_header Host $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 $scheme;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_cache off;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 86400s;
|
|
client_max_body_size 0;
|
|
}
|
|
|
|
# Expose all nodes data on https://$EVN_TITLE_STRING.blockchain.logos.co/internal/node-data/.
|
|
location /node-data/ {
|
|
alias /node-data/;
|
|
autoindex on;
|
|
}
|
|
}
|
|
}
|