Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Proxy pass to two applications looking for root
Post Body

I'm using Trino and Airflow, trying to get nginx in front of them. Using this config:

upstream trino { server trinocoordinator:7080 fail_timeout=3s max_fails=1; }

upstream airflow { server airflow-webserver:8081 fail_timeout=3s max_fails=1; }

server { listen 80; listen [::]:80; server_name trino;

location / {
    proxy_pass http://trino/;
    proxy_redirect off;
    proxy_connect_timeout 3;

    proxy_set_header Host $http_host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

location /trino/ {
    #allow 127.0.0.1;
    #allow 192.168.80.1;
    #deny all;

    proxy_pass http://trino/;
    proxy_redirect off;
    proxy_connect_timeout 3;

    proxy_set_header Host $http_host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
location /trino {
    #allow 127.0.0.1;
    #allow 192.168.80.1;
    #deny all;

    proxy_pass http://trino/;
    proxy_redirect off;
    proxy_connect_timeout 3;

    proxy_set_header Host $http_host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

If I take out the location / neither the /trino/ or /trino locations work, they try to pull index from /etc/nginx/html/ instead.

I was hoping I could proxy_pass location /trino/ to http://trino/ and location /airflow/ to http://airflow/ but it's not appropriately sending the request to each respective container.

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
40,644
Link Karma
317
Comment Karma
39,809
Profile updated: 3 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago