Opened 18 months ago
Closed 18 months ago
#2495 closed task (invalid)
How to create same location to point different proxy server
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | |
Component: | nginx-module | Version: | 1.14.x |
Keywords: | nginx.conf | Cc: | kadhar2006@… |
uname -a: | |||
nginx -V: | nginx version: nginx/1.14.1 |
Description
I have configured the Load Balancer(Nginx) for ignition. I have created two upstream(ignapp & ignProdapp) server. For ignapp upstream it is working fine. I need to configure the below code for upstream server(ignProdapp) in the same configuration file how to do this. Below is the sample configuration for the server ignapp. Can you please help me how to configure the below settings for another upstream server. Below is the config setting for ignapp same way I need to do it for creating location ~ /data/, location ~ /system/ , location ~ /res/ , location ~ /idp/, location ~ /.well-known/ for ignappPro Upstream server .
I have attached the configuration file here.
Change History (2)
comment:1 by , 18 months ago
comment:2 by , 18 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
For questions on how to configure nginx, please consider using support options available.
Upstream ignapp{
ip_hash;
server 10.10.10.11:8088;
}
upstream ignappPro {
ip_hash;
server 10.10.10.12:8088;
}
server {
listen 80;
server_name www.abdul.com;
location ~ /data/ {
proxy_pass ignapp/data/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
location ~ /system/ {
proxy_pass ignapp/system/;
tp_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
location ~ /res/ {
proxy_pass ignapp/res/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
location ~ /idp/ {
proxy_pass ignapp/idp/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
location ~ /.well-known/ {
proxy_pass ignapp/.well-known/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
# Here we are setting the protocol type, address, port, and uri (optional) that will be the destination of our proxied server:
location / {
proxy_pass ignapp/data/perspective/client/demo/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
}
}