How do I set up Redash server behind an nginx with path? #6319
-
Hey everyone I want to set up a Redash server behind an nginx reverse-proxy, but I want it to sit behind a path, meaning:
Is there documentation regarding how to do this? There's usually an environment variable like |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
I used Caddy just to do this as I felt that things are more complex to configure in nginx. You just need the following configuration file for caddy to access redash using the URL https://yourhost.yourdomain.com
Assuming that redash is already setup to run on yourhost.yourdomain.com Hope it helps. |
Beta Was this translation helpful? Give feedback.
-
Thanks.
My first post....
…On Mon, Jul 31, 2023 at 9:19 PM Justin Clift ***@***.***> wrote:
Note that I just reformatted that config section to be easier to read. 😄
—
Reply to this email directly, view it on GitHub
<#6319 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQOXKT7WRM2PAGRYBTEUUDXTB7UXANCNFSM6AAAAAA25CFKQI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I didn't want /redash in the path, hence the need for tweaking...
…On Mon, Jul 31, 2023, 10:09 PM Justin Clift ***@***.***> wrote:
As a rough guess there, making that location line say this *might* work:
location /redash {
—
Reply to this email directly, view it on GitHub
<#6319 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQOXKVDOUWX6FXZHXFGUMDXTCFP3ANCNFSM6AAAAAA25CFKQI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
any solutions for this ? |
Beta Was this translation helpful? Give feedback.
-
Hope this can help, should work with SAML/LDAP login too. We are using SAML login and it's running for a while, no Redash code change needed. Frontend use NGINX's Redash version: upstream redash_server {
server 127.0.0.1:5000;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
access_log /dev/stdout;
error_log /dev/stderr info;
include /etc/nginx/ssl.conf;
location /redash/ {
sub_filter ="/" ="/redash/";
sub_filter ="/static/ ="/redash/static/;
sub_filter ="/ldap/ ="/redash/ldap/;
sub_filter ="/saml/login ="/redash/saml/login;
sub_filter url(/static url(/redash/static;
sub_filter_once off;
sub_filter_types application/javascript text/css text/xml text/javascript application/json text/plain;
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;
proxy_set_header SCRIPT_NAME /redash;
proxy_pass http://redash_server;
}
} Reference: |
Beta Was this translation helpful? Give feedback.
Hope this can help, should work with SAML/LDAP login too. We are using SAML login and it's running for a while, no Redash code change needed.
Frontend use NGINX's
sub_filter
to replace/
to/redash
.Backend use
SCRIPT_NAME
header let WSGI to prepend/redash
when processing requests.Redash version:
v10.1.0
, Docker Tag:redash/redash:10.1.0.b50633
NGINX version:
nginx:1.23.2-alpine