attu: reverse proxy by nginx error

Describe the bug: behind nginx with a sub path, how to set the resource root path with the sub path such as: http://example.com/path/to/milvus

nginx config:

  location /path/to/milvus/ {
    proxy_pass http://11.132.42.228:30006;
    proxy_set_header Host $http_host;
  }

request the url:http://example.com/path/to/milvus,response the error: image

Attu version: zilliz/attu:v2.2.8

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 16

Most upvoted comments

I don’t have the env, but I can give you an example, you need to test it by yourself:)

location /path/to/milvus/ {
    proxy_pass http://11.132.42.228:30006/;
    proxy_set_header Host $http_host;
  }
dock run -e HOST_URL= /path/to/milvus/  -p 30006:3000 zilliz/attu:v2.3.3

For this case, all the requests send from you browsers should be prefixed with /path/to/milvus/ . and it should go to the real address behind the /path/to/milvus/

ok, it works dock run -e HOST_URL= /path/to/milvus/ -p 30006:3000 zilliz/attu:v2.3.3 location /example/vec/ {
proxy_pass http://localhost:30006/;
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;
}

location /path/to/milvus/ {
proxy_pass http://localhost:30006/;
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;
}

I see. will fix it soon.