NGINX + Spark Web UI

mjordan79 nginx-forum at nginx.us
Thu Sep 17 10:05:15 UTC 2015


Hello!
I'm trying to set up a reverse proxy (using nginx) for the Spark Web UI.
I have 2 machines:
   1) Machine A, with a public IP. This machine will be used to access Spark
Web UI on the Machine B through its private IP address.
   2) Machine B, where Spark is installed (standalone master cluster, 1
worker node and the history server) not accessible from the outside.

Basically I want to access the Spark Web UI through my Machine A using the
URL:
http://machine_A_ip_address/spark

Currently I have this setup:
http {
   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_set_header X-Ssl on;
}

# Master cluster node
upstream app_master {
        server machine_B_ip_address:8080;
}

# Slave worker node
upstream app_worker {
        server machine_B_ip_address:8081;
}

# Job UI
upstream app_ui {
        server machine_B_ip_address:4040;
 }

# History server
upstream app_history {
        server machine_B_ip_address:18080;
 }

I'm really struggling in figuring out a correct location directive to make
the whole thing work, not only for accessing all ports using the url /spark
but also in making the links in the web app be transformed accordingly.

Any help really appreciated.
Thank you in advance.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261637,261637#msg-261637



More information about the nginx mailing list