server {
    listen 4200 default_server;
    server_name ucweb.easyops-only.com;

    root /usr/local/ucpro/ucpro_web/;

    if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
        set $year $1;
        set $month $2;
        set $day $3;
    }

    access_log  log/ucweb.easyops-only.com.access.log.$year$month$day main;
    error_log   log/ucweb.easyops-only.com.error.log;

    location / {
        try_files $uri $uri/ /index.html;
        index  index.htm index.html;
    }

    location ~ \.(json|gz)$ {
      root /usr/local/ucpro/;
    }

    location /ucpro_service/api/ {
        proxy_pass http://127.0.0.1:8077/;
        proxy_http_version 1.1;
        client_max_body_size 2000M;
        proxy_read_timeout 600;
        proxy_connect_timeout 600s;
        proxy_send_timeout 600s;
    }
}
