pretendo-docker/config/nginx/minio.conf
Matthew Lopez 56e45e8fcd
Reconfigure MinIO to be proxied through Nginx
This change is necessary because some games need to connect to a S3 server directly, and MinIO is limited to listening on one domain for virtual hosts.
2024-02-22 21:13:37 -05:00

17 lines
875 B
Plaintext

server {
listen 80;
# Listening on ports 9000 and 80 at the same time causes the error "The request signature we calculated does not
# match the signature you provided." This seems to be due to how S3 signatures are calculated: the client calculates
# it based on the endpoint it is configured with, and the server calculates it based on the Host header it recieves.
# So, if the client send a request using port 9000 but the reverse proxy sends a Host header without a port, the
# signature will not match. Limiting the reverse proxy to listen only on default ports fixes this.
listen 443 ssl;
server_name minio.pretendo.cc pn-cdn.minio.pretendo.cc pn-boss.minio.pretendo.cc super-mario-maker.minio.pretendo.cc;
set $upstream http://minio:9000;
location / {
proxy_pass $upstream;
proxy_set_header Host $host;
}
}