nginx-4:web服务器
参考:https://blog.csdn.net/qq_29677867/article/details/90114001
一、nginx 做静态服务器
location /static/ {
root /data/db;
}
http://xx.xx.xx.xx:90/static/images/1.png
二、nginx 反向代理后端服务
1. 配置 nginx 环境
upstream spring_zuul{
server 127.0.0.1:8080;
}
location /epay {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
root html;
index index.html index.htm;
proxy_pass http://spring_zuul;
}