Serve public MinIO files at /file/:file_name and add a native Ubuntu MinIO install.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 13:47:57 +05:00
parent 71479f4355
commit 6191b7536c
10 changed files with 149 additions and 23 deletions

19
nginx/file.conf Normal file
View File

@@ -0,0 +1,19 @@
# Public file download (MinIO objects).
# Copy into the HTTPS server block, or:
# sudo cp nginx/file.conf /etc/nginx/snippets/online-back-file.conf
# include /etc/nginx/snippets/online-back-file.conf;
#
# URL: https://<host>/file/<file_name>
# App: GET http://127.0.0.1:5005/file/<file_name>
location /file/ {
proxy_pass http://127.0.0.1:5005/file/;
proxy_http_version 1.1;
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;
expires 7d;
add_header Cache-Control "public, max-age=604800";
}

View File

@@ -30,6 +30,19 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Public MinIO files: https://test.webulgam.com/file/<file_name>
# Snippet lives at nginx/file.conf — copy to snippets if you prefer include.
location /file/ {
proxy_pass http://127.0.0.1:5005/file/;
proxy_http_version 1.1;
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;
expires 7d;
add_header Cache-Control "public, max-age=604800";
}
# --- existing project → :5050 ---
location /admin {
proxy_pass http://127.0.0.1:5050;