Subham9126 commited on
Commit
0d980df
Β·
verified Β·
1 Parent(s): ec95647

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +35 -13
nginx.conf CHANGED
@@ -1,39 +1,61 @@
1
- events {}
 
 
 
 
 
 
2
 
3
  http {
 
 
 
 
4
  server {
5
  listen 7860;
6
 
7
- # Redpanda Console UI β†’ root
8
- location / {
9
- proxy_pass http://localhost:8080;
10
  proxy_set_header Host $host;
11
- proxy_set_header X-Real-IP $remote_addr;
 
 
12
  }
13
 
14
- # Pandaproxy β€” Kafka over REST
15
  location /kafka/ {
16
  rewrite ^/kafka/(.*) /$1 break;
17
- proxy_pass http://localhost:8082;
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://localhost:8081;
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://localhost:9644;
35
  proxy_set_header Host $host;
36
- proxy_set_header X-Real-IP $remote_addr;
 
 
 
 
 
 
 
 
 
 
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
  }