1. 程式人生 > >spring cloud + nginx配置

spring cloud + nginx配置

超時 max eal AR set cati con cloud edi

server { 
    listen 80 default_server;
    location /{
        root /path/html
        add_header Cache-Control max-age=864000
    }
      location ^~ /service {
            proxy_pass http://ateway:20000/;

            proxy_redirect  off;
            proxy_cookie_path   / /service;

            proxy_set_header    Host $host;
            proxy_set_header    X-Real-IP $remote_addr;
            proxy_set_header    X-Forwarded-Host $remote_addr;
            proxy_set_header    X-Forwarded-Server $remote_addr;
            proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;

            # 超時控制
            proxy_connect_timeout 1200s;
            proxy_send_timeout 1200s;
            proxy_read_timeout 1200s;
        }
       
 }

spring cloud + nginx配置