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:
19
nginx/file.conf
Normal file
19
nginx/file.conf
Normal 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";
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user