105 lines
3.4 KiB
Plaintext
105 lines
3.4 KiB
Plaintext
# MinIO Nginx Configuration
|
|
# For use with Nginx Proxy Manager or standalone Nginx
|
|
# This configuration provides HTTPS access to MinIO API and Console
|
|
|
|
# ============================================================================
|
|
# MinIO S3 API - Port 9000
|
|
# Subpath: /minio
|
|
# ============================================================================
|
|
location /minio/ {
|
|
# Rewrite path to remove /minio prefix
|
|
rewrite ^/minio/(.*) /$1 break;
|
|
|
|
# Forward to MinIO API
|
|
proxy_pass http://192.168.100.9:9000;
|
|
|
|
# Preserve headers
|
|
proxy_set_header Host $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-Forwarded-Host $host;
|
|
|
|
# Required for MinIO
|
|
proxy_set_header X-NginX-Proxy true;
|
|
|
|
# Disable buffering for large uploads
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
|
|
# Timeouts for large file uploads/downloads
|
|
proxy_connect_timeout 300;
|
|
proxy_send_timeout 300;
|
|
proxy_read_timeout 300;
|
|
send_timeout 300;
|
|
|
|
# Max upload size (adjust as needed)
|
|
client_max_body_size 0;
|
|
}
|
|
|
|
# ============================================================================
|
|
# MinIO Console (Web UI) - Port 9001
|
|
# Subpath: /minio-console
|
|
# ============================================================================
|
|
location /minio-console/ {
|
|
# Forward to MinIO Console
|
|
proxy_pass http://192.168.100.9:9001/;
|
|
|
|
# Preserve headers
|
|
proxy_set_header Host $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-Forwarded-Host $host;
|
|
|
|
# WebSocket support for real-time updates
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Disable buffering
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
|
|
# Timeouts
|
|
proxy_connect_timeout 300;
|
|
proxy_send_timeout 300;
|
|
proxy_read_timeout 300;
|
|
}
|
|
|
|
# ============================================================================
|
|
# MinIO Console Assets
|
|
# ============================================================================
|
|
location /minio-console/assets/ {
|
|
proxy_pass http://192.168.100.9:9001/assets/;
|
|
proxy_set_header Host $host;
|
|
proxy_cache_valid 200 1d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# ============================================================================
|
|
# MinIO Console API
|
|
# ============================================================================
|
|
location /minio-console/api/ {
|
|
proxy_pass http://192.168.100.9:9001/api/;
|
|
proxy_set_header Host $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;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_buffering off;
|
|
}
|
|
|
|
# ============================================================================
|
|
# MinIO Health Check
|
|
# ============================================================================
|
|
location /minio/health {
|
|
proxy_pass http://192.168.100.9:9000/minio/health;
|
|
proxy_set_header Host $host;
|
|
access_log off;
|
|
}
|