Proxy pass from NGINX to Object Storage
Hi, I have created a subdomain that I am handling through my NGINX configuration and want to setup a reverse proxy to my object storage URL so that the object storage URL is not exposed to the clients and also because I want the subdomain to directly map to a specific folder in the object storage. The reverse proxy pass simply contains the URL and the complete path but I get an NoSuchBucket error. If I do rewrite or redirect then it works, but that also changes the URL in the browser which I don't want. I have setup the proxy headers and everything should be forwarded correctly.
1 Reply
Although I haven't been able to fully replicate it myself yet, I've found the following forum discussion about setting up and troubleshooting proxy_pass for S3 compatible buckets:
- regex - How to set nginx proxy path to use static contents of a specific s3 bucket folder? - Stack Overflow
- regular expressions - Nginx proxy for CNAME setup - Server Fault
- wildcard subdomain - How to point cname to nginx server that uses reverse-proxy - Stack Overflow
You may also want to provide a sanitized output of both your server config block and the output of the following curl command:
curl -iL $URL
Since this may help provide more insight into why the proxy_pass header is failing as-intended.