1. Ruqirement
nginx accepts the request url uniformly and forwards it
http://172.16.51.91:9000/44010000/api/order/create
http://172.16.51.91:9000/44060000/api/order/create
goal:
http://172.15.10.13:9001/api/order/create
http://172.15.10.13:9002/api/order/create
2. nginx Setting
nginx accepts the request url uniformly and forwards it
http://172.16.51.91:9000/44010000/api/order/create
http://172.16.51.91:9000/44060000/api/order/create
goal:
http://172.15.10.13:9001/api/order/create
http://172.15.10.13:9002/api/order/create
2. nginx Setting
server {
listen 9000;
server_name 172.16.51.91;
location /44010000/ {
proxy_pass http://172.15.10.13:9001/;
}
location /44060000/ {
proxy_pass http://172.15.10.13:10002/;
}
}
Read More:
- Nginx, which is suitable for front-end H5 requests, routes and forwards according to the URL and cuts the URL
- The request was rejected because the URL contained a potentially malicious String “//“
- [Solved] nginx: [error] open() “/usr/local/nginx/nginx.pid” failed (2: No such file or directory)
- Nginx Startup Error: “/var/run/nginx/nginx.pid” failed” [How to Solve]
- Nginx Error: nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /project/api/nginx.conf:
- Git Push Error: error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
- Common configuration methods of nginx
- Nginx Error: Swap file “/etc/nginx/.nginx.conf.swp“ already exists
- [Solved] Nginx Restart Error: /run/nginx.pid failed (2: No such file or directory)
- Nginx error: nginx: [error] invalid PID number ““ in “/run/nginx.pid“
- [Solved] yocto Compile Error: ERROR: libtinyxml2-XXX do_fetch: Fetcher failure for URL
- Nginx realizes the same background service for portal and business
- Nginx Startup Error: Job for nginx.service failed because the control process exited with error code
- How to Fix No default.conf file in conf.d after Installing Nginx
- Nginx Error: [emerg] bind() to [::]:80 failed (98: Address already in use)
- Nginx Reverse Proxy 426 Error [How to Fix]
- Solve the problem of 404 Not Found error in nginx accessing dynamic interface
- Nginx configuration 80 can be accessed by forcing jump 443 or not
- nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
- Restart and stop of nginx in Linux service