1. upstream ruoyi {
    2. server 192.168.31.101:8080 weight=5;
    3. server 192.168.31.102:8080 weight=3;
    4. }
    5. server {
    6. location /prod-api/ {
    7. proxy_set_header Host $http_host;
    8. proxy_set_header X-Real-IP $remote_addr;
    9. proxy_set_header REMOTE-HOST $remote_addr;
    10. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    11. proxy_pass http://ruoyi/;
    12. }