From 8092661991684c3500e862513e1eab727d3d024c Mon Sep 17 00:00:00 2001 From: zhangkaihuai Date: Thu, 20 Mar 2025 14:23:05 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20default.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- default.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 default.conf diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..f85e348 --- /dev/null +++ b/default.conf @@ -0,0 +1,19 @@ +server { + listen 80; + listen [::]:80; + + location /api { + proxy_pass http://gateway.dev.svc.cluster.local:8080; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Port $server_port; + #proxy_set_header Host $host; + rewrite "^/api/(.*)$" /$1 break; + } + + location / { + root /home/clay; + index index.html index.htm; + } + +}