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.
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.
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/nginx/comme...