欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

nginx  

程序员文章站 2022-07-12 17:21:44
...
nginx.conf文件配置:

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    include /*.conf;
}



pxy-api-dev-pc.conf文件下配置:

server {
    listen      10001;
    server_name localhost;

    location / {
        root d:\source\WRK-pages\pc;
    }

    location /api {
        proxy_pass         http://10.64.4.101:8003/api;
        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 /api/accreditUserGuides/list {
        proxy_pass         http://127.0.0.1:8003/api/accreditUserGuides/list;
        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 /api/accreditUserGuides/saveUpdate {
        proxy_pass         http://127.0.0.1:8003/api/accreditUserGuides/saveUpdate;
        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 /api/accreditUserGuides/published {
        proxy_pass         http://127.0.0.1:8003/api/accreditUserGuides/published;
        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 /api/accreditUserGuides/clonePublished {
        proxy_pass         http://127.0.0.1:8003/api/accreditUserGuides/clonePublished ;
        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 /api/accreditUserGuides/deleteGuides {
        proxy_pass         http://127.0.0.1:8003/api/accreditUserGuides/deleteGuides ;
        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 /api/guides/getAccreditOrgsMsg {
        proxy_pass         http://127.0.0.1:8010/api/guides/getAccreditOrgsMsg ;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
    }

}


阿里云登录用户名:taozhangyi1219

地址:112.74.40.101
密码:Tzy****

数据库:rm-wz9kk1x84g083gg4co.mysql.rds.aliyuncs.com
root
Aa123456