I'm not very experienced with nginx. I'm having trouble with using ngxinx as a proxy in front of minio. I've been adding a minio service (4 were already running fine) but now nginx has stopped working for me, so I must have messed something up.I'm running ngxinx and minio on macOS High Sierra, installed via brew.
When connecting from the new laptop, nginx reports:
2018/11/10 18:15:23 [error] 51450#0: *25 open() "/usr/local/Cellar/nginx/1.13.10/html/renskedocumentsanddesktop" failed (2: No such file or directory), client: 192.168.2.91, server: dumbledore.rna.nl, request: "GET /renskedocumentsanddesktop?max-keys=1000 HTTP/1.1", host: "dumbledore.rna.nl:9000"
So, while from another laptop, nginx passes the request apparently on to minio without problems (no log entry by nginx, but it works), from the other laptop it wants to load something highly appropriate, namely "renskedocumentsanddesktop" from somewhere in the nginx install tree.
Somehow, nginx tries to serve the file itself instead of acting like a proxy and passing it on.
nginx servers include is a file that looks like this:
server {
listen 9000 ssl;
server_name myhost.mydomain.tld;
ssl_certificate minio_certificate_chained.crt;
ssl_certificate_key minio_certificate.key;
ssl_protocols TLSv1.2;
proxy_buffering off;
client_max_body_size 1000m;
location / {
proxy_set_header Host $http_host;
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9001;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9002;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9003;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9004;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9005;
}
}
}
And that works for addressing the minio on port 9003 but not the one on 9005 which produces the error. I'm completely baffled because as far as I can see for both services the nginx situation is technically the same
When connecting from the new laptop, nginx reports:
2018/11/10 18:15:23 [error] 51450#0: *25 open() "/usr/local/Cellar/nginx/1.13.10/html/renskedocumentsanddesktop" failed (2: No such file or directory), client: 192.168.2.91, server: dumbledore.rna.nl, request: "GET /renskedocumentsanddesktop?max-keys=1000 HTTP/1.1", host: "dumbledore.rna.nl:9000"
So, while from another laptop, nginx passes the request apparently on to minio without problems (no log entry by nginx, but it works), from the other laptop it wants to load something highly appropriate, namely "renskedocumentsanddesktop" from somewhere in the nginx install tree.
Somehow, nginx tries to serve the file itself instead of acting like a proxy and passing it on.
nginx servers include is a file that looks like this:
server {
listen 9000 ssl;
server_name myhost.mydomain.tld;
ssl_certificate minio_certificate_chained.crt;
ssl_certificate_key minio_certificate.key;
ssl_protocols TLSv1.2;
proxy_buffering off;
client_max_body_size 1000m;
location / {
proxy_set_header Host $http_host;
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9001;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9002;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9003;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9004;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=***") {
proxy_pass http://127.0.0.1:9005;
}
}
}
And that works for addressing the minio on port 9003 but not the one on 9005 which produces the error. I'm completely baffled because as far as I can see for both services the nginx situation is technically the same