2019-05-29 09:14:06 +00:00
|
|
|
# MinIO public service
|
|
|
|
upstream minio-backend {
|
|
|
|
server minio:9000 fail_timeout=0;
|
|
|
|
}
|
2019-06-06 19:58:21 +00:00
|
|
|
{% if ACTIVATE_HTTPS %}
|
|
|
|
server {
|
|
|
|
server_name {{ MINIO_HOST }};
|
|
|
|
listen 80;
|
|
|
|
return 301 https://$server_name$request_uri;
|
|
|
|
}
|
|
|
|
{% endif %}
|
2019-05-29 09:14:06 +00:00
|
|
|
server {
|
|
|
|
{% if ACTIVATE_HTTPS %}listen 443 {{ "" if WEB_PROXY else "ssl" }};{% else %}listen 80;{% endif %}
|
|
|
|
server_name minio.localhost {{ MINIO_HOST }};
|
|
|
|
|
|
|
|
{% if ACTIVATE_HTTPS and not WEB_PROXY %}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/{{ MINIO_HOST }}/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/{{ MINIO_HOST }}/privkey.pem;
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# Disables server version feedback on pages and in headers
|
|
|
|
server_tokens off;
|
2019-06-06 19:58:21 +00:00
|
|
|
|
|
|
|
client_max_body_size 0;
|
2019-05-29 09:14:06 +00:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_redirect off;
|
|
|
|
|
|
|
|
proxy_pass http://minio-backend;
|
|
|
|
}
|
|
|
|
}
|