6

I am running Apache Superset at the following address:

http://superset.example.com:8088

That gets redirected to:

http://superset.example.com:8088/superset/welcome

Ideally, users would get redirected to:

http://superset.example.com:8088/welcome

How can that be accomplished? As well I would like for it to run under port 80 so the port doesn't need to be specified but I haven't been able to do that either.

TylerH
  • 20,799
  • 66
  • 75
  • 101
MoreScratch
  • 2,933
  • 6
  • 34
  • 65
  • That URL prefix is defined in the source code, so you would have to use some proxy method or change the source. Use the -p options to change the port. – will7200 Jun 19 '18 at 15:41

3 Answers3

3

This issue covers what you're talking about:

https://github.com/apache/incubator-superset/issues/985

which led to this closed PR:

https://github.com/apache/incubator-superset/pull/1866

You can try to reopen the PR and finish it, or you can try configuring nginx like this guy suggests.

Garrett Bates
  • 823
  • 1
  • 11
  • 16
3

I found it very frustrating to setup a base url for superset. If you want to save some time, I condensed a couple of comments into a working example here: https://github.com/komoot/superset-reverse-nginx-example

linqu
  • 11,320
  • 8
  • 55
  • 67
1

Below is the way I eventually made it to run on an endpoint other than '/'. But my use case is to make it work on AWS Lambda in Serverless environment.

Eventually what i did was the below to make it work:

  1. In config.py i have added another configuration variable and used this variable in locations where redirect or appbuilder.add_link has been used.
  2. In templates folder there are places where directly '/superset/' has been used. So, even if i did first step right, the templates are not rendering in right way. So, i have to go and change the template as well (As of now I have hard-coded this. I need to make it configurable)
  3. In front-end i have added a file called config.ts and I have used this config in locations wherever redirect was done in front-end. This has fixed up all my front-end links.
  4. Only thing remaining for me was fixing "Upload CSV to Database" Link. When we click this link and enter the data, since Lambda doesn't allow any writes i tried to write to /tmp - but since we don't know whether the next request is going to be served by same lambda or not... so this is an issue as of now. The way I am planning to fix this is to write the files to s3 instead of local folder. I am still figuring out a way to do this.

-- No more nginx or other links. We don't even need gunicorn in this setup.

Thanks

Explorer
  • 121
  • 2
  • 7