server {
    listen 80;
    server_name minio.xiezhu.me;

    include /etc/nginx/snippets/letsencrypt.conf;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name minio.xiezhu.me;

    ssl_certificate /etc/letsencrypt/live/minio.xiezhu.me/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/minio.xiezhu.me/privkey.pem;

    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        include /etc/nginx/snippets/websocket.conf;
        proxy_pass http://172.18.188.199:9001;
    }
}

server {
    listen 80;
    server_name s3.xiezhu.me;

    include /etc/nginx/snippets/letsencrypt.conf;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    server_name s3.xiezhu.me;

    ssl_certificate /etc/letsencrypt/live/s3.xiezhu.me/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/s3.xiezhu.me/privkey.pem;

    include /etc/nginx/snippets/ssl-params.conf;

    location / {
        proxy_pass http://172.18.188.199:9000;
    }

    location /pub {
        proxy_pass http://172.18.188.199:9000/pub-bucket/;
    }
}
