核心代码如下:

server {
        listen       9003;
        client_max_body_size 200m;
        proxy_read_timeout 600;
        server_name  zhushuyin;

        location /api {
            root   html;
            index  index.aspx index.html index.htm;
            proxy_pass http://192.168.106.36:9003;
            proxy_set_header  Host  $host;
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  X_Forwarded-For  $proxy_add_x_forwarded_for;
        }
        
        location / {
             root site;
             try_files $uri $uri/ /index.html;
        }
    }

 

相关文章:

  • 2022-01-13
  • 2021-10-26
  • 2021-04-25
  • 2022-12-23
  • 2022-01-15
  • 2021-05-03
  • 2021-08-23
  • 2021-07-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-07-24
  • 2021-11-07
  • 2022-01-01
  • 2021-07-25
相关资源
相似解决方案