-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Subpath behavior #2818
Fix Subpath behavior #2818
Conversation
Signed-off-by: Daniel Valdivia <[email protected]>
Vanilla nginx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Issue is related to a misconfiguration in nginx, fixed and it worked.
@dvaldivia I observe that your modification depends on the |
Just posterity, the way the env are set didn't work so I had to do it like:
Note that there are no |
This still feels very fragile or at least poorly documented. I played around with different combinations of slashes for Should I open a new issue for that and if yes, is this a problem of the console which can be made more robust (e.g. I think PS: May final configuration is as followsserver {
...
location /console/ {
proxy_set_header Host $http_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;
proxy_set_header X-NginX-Proxy true;
# This is necessary to pass the correct IP to be hashed
real_ip_header X-Real-IP;
proxy_connect_timeout 300;
# To support websockets in MinIO versions released after January 2023
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
chunked_transfer_encoding off;
proxy_pass http://127.0.0.1:7001/;
}
}
services:
minio:
image: quay.io/minio/minio:RELEASE.2023-06-29T05-12-28Z
command: server --address ":7000" --console-address ":7001" /data
ports:
- "127.0.0.1:7000:7000"
- "127.0.0.1:7001:7001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
MINIO_SERVER_URL: https://s3.example.com/
MINIO_BROWSER_REDIRECT_URL: https://s3.example.com/console/
... |
We have an issue to document the updates to subpath behavior, but that is somewhat distinct from using either of those envvars - which last I checked, were mostly necessary for ensuring the Console can correctly connect to the MinIO Server over specific hostnames. |
To put a finer point on it - this is fragile/poorly documented, primarily because NGINX is not our product. We do need to make improvements and further clarify where to use the envvars in question, but we also cannot promise that our boilerplate NGINX configuration will work in all possible scenarios. We have to assume the implementer has access to NGINX expertise to figure out the gaps. |
Fixes subpath behavior for
Console
How to Test this PR
Vanilla nginx
Assuming we are exposing the console under
http://localhost:8000/console/subpath/
make assets
and build MinIO with this branch of consolenginx
with the following configuraitonwith the command
In Kubernetes with nginx ingress
Full Tenant Example:
In all cases:
Fixes #1908
Fixes #2045
Fixes #2149
Fixes #2188
Fixes #2483
Fixes #2766
Fixes #2774
Fixes #2775