Skip to content
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

No access to buckets and policies in console when using reverse proxy subpath #2775

Closed
beatstream69 opened this issue Apr 12, 2023 · 3 comments · Fixed by #2818
Closed

No access to buckets and policies in console when using reverse proxy subpath #2775

beatstream69 opened this issue Apr 12, 2023 · 3 comments · Fixed by #2818

Comments

@beatstream69
Copy link

beatstream69 commented Apr 12, 2023

No access to buckets and policies (and possibly something else?) in web console when using reverse proxy subpath

Expected Behavior

Web console try to access /subpath/api/v1/buckets and all is good

Current Behavior

Web console try to access /api/v1/buckets which is not working

Possible Solution

Revert to RELEASE.2023-03-24T21-41-23Z

Steps to Reproduce (for bugs)

set MINIO_BROWSER_REDIRECT_URL=https://example.com/subpath
start minio
try to open https://example.com/subpath/buckets
or https://example.com/subpath/policies

Regression

Yes, worked with docker image RELEASE.2023-03-24T21-41-23Z

Your Environment

  • Version used: RELEASE.2023-04-07T05-28-58Z (go1.20.3 linux/amd64)
  • Server setup and configuration: docker container, nginx reverse proxy
    Nginx relevant config:
server {
        root /var/www/html;
        index index.html index.htm index.nginx-debian.html;
        server_name example.com;
        listen 443 ssl;
        client_max_body_size 10G;
        proxy_read_timeout 3600;
        proxy_connect_timeout 3600;
        proxy_send_timeout 3600;
        proxy_cache off;
...
        location /subpath {
                rewrite   ^/subpath/(.*) /$1 break;
                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;
                real_ip_header X-Real-IP;
                proxy_connect_timeout 300;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                chunked_transfer_encoding off;
                proxy_pass http://192.168.0.201:9012;
        }
}
server {
        server_name example.com;
        listen 9011 ssl;
        ...<ssl config>...
        ignore_invalid_headers off;
        client_max_body_size 10G;
        proxy_buffering off;
        proxy_request_buffering off;
        location / {
                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_connect_timeout 300;
                proxy_http_version 1.1;
                proxy_set_header Connection "";
                chunked_transfer_encoding off;
                proxy_pass http://192.168.0.201:9011;
        }
}
@harshavardhana harshavardhana transferred this issue from minio/minio Apr 12, 2023
@avnav0
Copy link

avnav0 commented Apr 12, 2023

same issue:
i have a similar problem. i'm using a subpath of /minio, the console works and the session request returns 200.

Request URL: http://10.235.77.22/minio/api/v1/session
Request Method: GET
Status Code: 200 OK
Remote Address: 10.235.77.22:80
Referrer Policy: strict-origin-when-cross-origin

but when you try to use certain pages like buckets, you get:

Request URL: http://10.235.77.22/api/v1/buckets
Request Method: GET
Status Code: 404 Not Found
Remote Address: 10.235.77.22:80
Referrer Policy: no-referrer

@avnav0
Copy link

avnav0 commented Apr 12, 2023

p.s. THANK YOU FOR THE ALTERNATIVE SOLUTION!!!!!! @beatstream69

@vmire
Copy link

vmire commented May 2, 2023

Duplicate of #2774

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants