Files
main-tbbank/backend/deployment/nginx-public.conf
2026-08-18 00:59:32 +05:00

31 lines
1018 B
Plaintext

# Snippet: /public → Go backend (Static serve)
# Include inside the tbbank.gov.tm server { } block, e.g.:
# include /var/www/tbbank/backend/deployment/nginx-public.conf;
#
# Or paste the location blocks into the existing site config.
# Uploaded / CMS media: /public/images/...
location /public/ {
proxy_pass http://127.0.0.1:5050;
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;
# optional cache for static assets
proxy_cache_valid 200 1h;
expires 1h;
add_header Cache-Control "public";
}
# MinIO-backed images via backend handler (if used)
location /images/ {
proxy_pass http://127.0.0.1:5050;
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;
}