Skip to content

How can I allow multiple presto coordinator's urls from NGINX #719

@nikeshthakre

Description

@nikeshthakre

I wanna allow two presto urls from nginx. bellow is the configuration of nginx.
presto-1 IP :172.18.0.14
presto-2 IP :172.18.0.12
but only one presto coordinator is running at a time. I wanna allow both presto working.

Below is the content of this file /etc/nginx/conf.d/ssl.conf :

server {
listen 443 ssl;
server_name _;

ssl_certificate             /root/server.crt;
ssl_certificate_key         /root/server.key;
ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers                 HIGH:!aNULL:!MD5;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location /presto-1/{
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://172.18.0.14:8443/;
}
location /presto-2/{
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass https://172.18.0.12:8443/;
}
location /v1/query/{
proxy_pass https://172.18.0.14:8443/v1/query/;
}
location /v1/cluster/{
proxy_pass https://172.18.0.14:8443/v1/cluster/;
}
location /v1/info/{
proxy_pass http://172.18.0.14:9090/v1/info;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions