fix minio nginx config

This commit is contained in:
2024-11-07 22:54:11 -07:00
parent 4f42fa82ac
commit a5e8c49da5

View File

@ -3,8 +3,8 @@
# Exit immediately if a command exits with a non-zero status.
set -e
# MinIO server should be running on port 9000
MINIO_PORT=9000
# MinIO server should be running on port 45855
MINIO_PORT=45855
# Configure nginx to proxy requests to the MinIO server
sudo tee /etc/nginx/sites-available/minio.sa.vin.conf > /dev/null <<EOL
@ -13,7 +13,7 @@ server {
server_name minio.sa.vin;
location / {
proxy_pass http://
proxy_pass http://127.0.0.1:$MINIO_PORT;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
@ -23,7 +23,7 @@ server {
EOL
# Create a symbolic link to enable the site
sudo ln -s /etc/nginx/sites-available/minio.sa.vin /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/minio.sa.vin.conf /etc/nginx/sites-enabled/
# Reload nginx to apply changes
sudo systemctl reload nginx