Changing Hue's URL Context Path

29 views
Skip to first unread message

ashe...@gmail.com

unread,
Sep 19, 2017, 4:56:05 PM9/19/17
to Hue-Users
Hello All,

We have a requirement to make Hue available through the customer's IBM Web Portal.  One of the requirements imposed on us is that Hue cannot be hosted at the root context path "https://localhost:8888/" and needs to be changed to something like "https://localhost:8888/hue/".
 
I am unable to find any means to do this. I have been researching to see if I can to it at the Hue/cherrypi level, Hue Load Balancer/httpd level, and even using haproxy. The closest I have gotten is using haproxy to get “https://localhost:8887/hue/” to point to “https://localhost:8888/" but the browser’s url is changed back to “https://localhost:8887/" when clicking any link.  Cloudera community support does not seem to think this is achievable.
 
Any ideas would be welcome. 

Thanks,
-Austin

Jordan Moore

unread,
Sep 20, 2017, 2:18:20 AM9/20/17
to Hue-Users
No, you can't make two servers on the same port. You need to run Hue on an external server, or other port on localhost, then reverse proxy it. 

So, looking at the Getting Started, Hue runs on 8000 by default <https://github.com/cloudera/hue#getting-started>

Specifically, you are looking for this 

build/env/bin/hue runserver

You can see here for an Nginx reverse proxy listening on port 8001 for 3 Hue Servers on port 8888 <http://gethue.com/using-nginx-to-speed-up-hue-3-8-0/>

Hue can be started on a different port with this command. Sounds like you want to just make that 8887

build/env/bin/hue runserver_plus 0.0.0.0:8888

You can see the Docker container, if that is an option for you  <https://github.com/cloudera/hue/blob/master/tools/docker/hue-base/Dockerfile#L43>

But, one you change the port, you are welcome to have your proxy's localhost:8888/hue endpoint redirect to Hue running on localhost:8887 , for example

Reply all
Reply to author
Forward
0 new messages