nginx配置

 

listen 8083; //正向代理
resolver 10.62.132.21;
location / {
# root html/test;
# index index.html index.htm;
# add_header 'Access-Control-Allow-Origin' '*';

proxy_pass http://$http_host$request_uri; #设定http代理服务器的协议和地址


}

location /apis { //反向代理
rewrite ^.+apis/?(.*)$ /$1 break;
proxy_pass http://msb.cpic.com.cn;

}

taskkill /f /t /im nginx.exe 终止进程

netstat -ano |findstr 8080 查找占用端口的进程·

gzip on;
gzip_static on;
gzip_buffers 4 16k;
gzip_comp_level 5;
gzip_types text/plain application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;

posted @ 2021-07-30 14:08  Dried-salted-fish  阅读(23)  评论(0)    收藏  举报