You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the nginxinc/nginx-s3-gateway Docker image as a proxy layer to serve static frontend files stored in a private S3 bucket. The container is running with the correct IAM role and is able to access the S3 bucket.
However, when I configure a custom location block like the following:
I frequently encounter 404 errors when accessing paths like /my-page or /my-page/index.html. It appears that the S3 gateway is not correctly resolving the URI or falling back as expected.
Would appreciate any guidance on whether this is a misconfiguration or an issue with how the S3 gateway handles rewrites and try_files.
Files do exist in S3 with paths like my-page/index.html
IAM role and permissions are correctly configured (files are accessible when requested directly via correct S3 path)
The 404s appear inconsistently depending on the request path
Below is the full config for reference:
Dockerfile:
FROM nginxinc/nginx-s3-gateway:latest
COPY js_fetch_trusted_certificate.conf /etc/nginx/templates/gateway/js_fetch_trusted_certificate.conf.template
COPY rules.conf /etc/nginx/templates/gateway/s3_server.conf.template
Bug Overview
I'm using the nginxinc/nginx-s3-gateway Docker image as a proxy layer to serve static frontend files stored in a private S3 bucket. The container is running with the correct IAM role and is able to access the S3 bucket.
However, when I configure a custom location block like the following:
I frequently encounter 404 errors when accessing paths like /my-page or /my-page/index.html. It appears that the S3 gateway is not correctly resolving the URI or falling back as expected.
Would appreciate any guidance on whether this is a misconfiguration or an issue with how the S3 gateway handles rewrites and try_files.
Below is the full config for reference:
Dockerfile:
js_fetch_trusted_certificate.conf:
rules.conf:
Expected Behavior
Route to map to correct s3 files and be accessible all the time
Steps to Reproduce the Bug
Environment Details
Latest: https://hub.docker.com/r/nginxinc/nginx-s3-gateway
IAM with K8s
Additional Context
No response
The text was updated successfully, but these errors were encountered: