server {
        listen       10000;
        server_name  localhost;
        underscores_in_headers on;

        location /zuihou-ui {
            proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            root /data/projects/;
            index index.html;
        }
        # 切记， 在docker启动的nginx 必须将该文件中所有的 localhost 改成服务器的 内网ip （不能为 127.0.0.1）
        location /api {
            proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            proxy_pass http://localhost:8760/api;
        }

        location /nacos {
            proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            proxy_pass http://localhost:8848/nacos;
        }

        location /zipkin {
            proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            proxy_pass http://localhost:9411/zipkin;
        }

        location /zuihou-monitor {
			proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            proxy_pass http://localhost:8762/zuihou-monitor;
        }

        # 文件跨域
        location /crossdomain.xml {
            alias /usr/local/nginx/html/crossdomain.xml;
        }
        # 文件访问配置
        location ^~ /file {
            if ($request_uri ~* ^.*\/(.*)\.(apk|java|txt|doc|pdf|rar|gz|zip|docx|exe|xlsx|ppt|pptx|jpg|png)(\?fileName=([^&]+))$) {
                add_header Content-Disposition "attachment;filename=$arg_attname";
            }
            root /data/projects/uploadfile;
            index index.html;
        }
}
server {
        listen       180;
        server_name  localhost;
        underscores_in_headers on;

        location /zuihou-admin-ui {
            proxy_set_header   Host $host:$server_port;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout 60;
            proxy_read_timeout 600;
            proxy_send_timeout 600;
            root /data/projects/;
            index index.html;
        }
}
