I have a strange problem with using a nginx as a reverse proxy for my Zeppelin instance. I will try to describe the problem below.
I am using an EC2 instance as the reverse proxy to access the Zeppelin instance. Just a note in front of that is an AWS ALB sitting as "forward proxy", this way I can use a friendly URL's for exposing the UI's. The path based routing on the AWS ALB is configured correctly.
-
The request is coming to AWS ALB with domain subdomain.domain.com/ds where I am using a path based routing to match all requests that are hitting the /ds as a path to my target group.
-
The incoming request is then passed to Nginx instance, which is working well. The problem is that if I am using a URL without trailing slash, the Nginx simply timeouts.
The configuration is below:
# Zeppelin
server {
listen 541;
location /ds {
rewrite ^/ds/(.*)$ /$1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://10.10.10.10:8890/;
proxy_redirect http://10.10.10.10:8890/ $scheme://$host/ds;
}
location /ds/ws {
proxy_pass http://10.10.10.10:8890/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade websocket;
proxy_set_header Connection upgrade;
proxy_read_timeout 86400;
}
}
Also, bellow is the most simple example that I am using for RStudio.
server {
listen 542;
location /ds {
rewrite ^/ds/(.*)$ /$1 break;
proxy_pass http://10.10.10.10:8787;
proxy_redirect http://10.10.10.10:8787/ $scheme://$host/ds/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_read_timeout 20d;
}
}
In case that trailing slash is not provided, I am getting
/ds not found

所有评论(0)