Update nginx.conf
Browse files- nginx.conf +35 -13
nginx.conf
CHANGED
|
@@ -1,39 +1,61 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
http {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
server {
|
| 5 |
listen 7860;
|
| 6 |
|
| 7 |
-
# Redpanda Console UI
|
| 8 |
-
location / {
|
| 9 |
-
proxy_pass http://
|
| 10 |
proxy_set_header Host $host;
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
-
# Pandaproxy β Kafka
|
| 15 |
location /kafka/ {
|
| 16 |
rewrite ^/kafka/(.*) /$1 break;
|
| 17 |
-
proxy_pass http://
|
| 18 |
proxy_set_header Host $host;
|
| 19 |
proxy_set_header X-Real-IP $remote_addr;
|
| 20 |
proxy_read_timeout 300s;
|
|
|
|
| 21 |
}
|
| 22 |
|
| 23 |
-
# Schema Registry
|
| 24 |
location /schema/ {
|
| 25 |
rewrite ^/schema/(.*) /$1 break;
|
| 26 |
-
proxy_pass http://
|
| 27 |
proxy_set_header Host $host;
|
| 28 |
-
proxy_set_header X-Real-IP $remote_addr;
|
| 29 |
}
|
| 30 |
|
| 31 |
-
# Admin API
|
| 32 |
location /admin/ {
|
| 33 |
rewrite ^/admin/(.*) /$1 break;
|
| 34 |
-
proxy_pass http://
|
| 35 |
proxy_set_header Host $host;
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
}
|
| 39 |
}
|
|
|
|
| 1 |
+
worker_processes 1;
|
| 2 |
+
pid /run/nginx.pid;
|
| 3 |
+
error_log /var/log/nginx/error.log warn;
|
| 4 |
+
|
| 5 |
+
events {
|
| 6 |
+
worker_connections 256;
|
| 7 |
+
}
|
| 8 |
|
| 9 |
http {
|
| 10 |
+
access_log /var/log/nginx/access.log;
|
| 11 |
+
client_body_temp_path /var/lib/nginx/body;
|
| 12 |
+
proxy_temp_path /var/lib/nginx/proxy;
|
| 13 |
+
|
| 14 |
server {
|
| 15 |
listen 7860;
|
| 16 |
|
| 17 |
+
# ββ Redpanda Console UI ββββββββββββββββββββββββββ
|
| 18 |
+
location /ui/ {
|
| 19 |
+
proxy_pass http://127.0.0.1:8080/ui/;
|
| 20 |
proxy_set_header Host $host;
|
| 21 |
+
proxy_http_version 1.1;
|
| 22 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 23 |
+
proxy_set_header Connection "upgrade";
|
| 24 |
}
|
| 25 |
|
| 26 |
+
# ββ Pandaproxy β Kafka REST API ββββββββββββββββββ
|
| 27 |
location /kafka/ {
|
| 28 |
rewrite ^/kafka/(.*) /$1 break;
|
| 29 |
+
proxy_pass http://127.0.0.1:8082;
|
| 30 |
proxy_set_header Host $host;
|
| 31 |
proxy_set_header X-Real-IP $remote_addr;
|
| 32 |
proxy_read_timeout 300s;
|
| 33 |
+
proxy_send_timeout 300s;
|
| 34 |
}
|
| 35 |
|
| 36 |
+
# ββ Schema Registry ββββββββββββββββββββββββββββββ
|
| 37 |
location /schema/ {
|
| 38 |
rewrite ^/schema/(.*) /$1 break;
|
| 39 |
+
proxy_pass http://127.0.0.1:8081;
|
| 40 |
proxy_set_header Host $host;
|
|
|
|
| 41 |
}
|
| 42 |
|
| 43 |
+
# ββ Admin API ββββββββββββββββββββββββββββββββββββ
|
| 44 |
location /admin/ {
|
| 45 |
rewrite ^/admin/(.*) /$1 break;
|
| 46 |
+
proxy_pass http://127.0.0.1:9644;
|
| 47 |
proxy_set_header Host $host;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
# ββ Health check βββββββββββββββββββββββββββββββββ
|
| 51 |
+
location /health {
|
| 52 |
+
return 200 'ok';
|
| 53 |
+
add_header Content-Type text/plain;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
# ββ Root β redirect to UI βββββββββββββββββββββββββ
|
| 57 |
+
location = / {
|
| 58 |
+
return 301 /ui/;
|
| 59 |
}
|
| 60 |
}
|
| 61 |
}
|