nginx.cnf
upstream apisix {
ip_hash;
server 173.16.102.118:9000 weight=1;
server 173.16.102.119:9000 weight=1;
}
upstream apisixApi {
server 173.16.102.118:9080 weight=1;
server 173.16.102.119:9080 weight=1;
}
conf/default.conf.yml
location / {
root /usr/share/nginx/html;
index index.html index.htm;
#proxy_pass http://apisix/;
}
location ^~/apisixApi/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
rewrite ^/apisixApi/(.*)$ /$1 break;
proxy_pass http://apisixApi/;
}