HumanSignal / HumanSignal/label-studio
Running label-studio behind nginx-ingress under a subpath leads to 404 not found error
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
I am trying to run label-studio under a subpath https:///label-studio
Following the documentation,
LABEL_STUDIO_HOST variable is set to https:.///label-studio,
And following ingress configuration is being used
```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/limit-burst-multiplier: "3"
nginx.ingress.kubernetes.io/limit-rps: "100"
nginx.ingress.kubernetes.io/preserve-trailing-slash: "false"
nginx.ingress.kubernetes.io/proxy-body-size: 64m
nginx.ingress.kubernetes.io/proxy-buffer-size: 16k
nginx.ingress.kubernetes.io/rewrite-target: /$1
generation: 5
name: label-studio-ls-app
namespace: myns
spec:
rules:
- host: '*.akridataeng.com'
http:
paths:
- backend:
service:
name: label-studio-ls-app
port:
number: 80
path: /label-studio/?(.*)
pathType: ImplementationSpecific
```
With this, I see that the request made from https:///label-studio is reaching the pod, but I am seeing the following error in the nginx pod logs
```
│ 2024/03/13 15:44:11 [error] 21#21: *1 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 172.31.2.225, server: , request: "GET / HTTP/1.1", host: "my.host.com" │
│ {"timestamp":"1710344651606","http":{"method":"GET","request_id":"94b38071e4518f6a376fdf006219f5ae","status_code":404,"content_type":"","useragent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36","referrer":"","x_forwarded_for":"172.31.23.129","url":"/","version":"HTTP/1.1","connection":"1","connection_r │
│ 2024/03/13 15:45:11 [info] 21#21: *1 client 172.31.2.225 closed keepalive connection
```
docker image being used is `heartexlabs/label-studio:1.11.0`
Contributor guide
Assessment
This issue has not been assessed yet.