Welcome! Log In Create A New Profile

Advanced

NGINX + Spark Web UI

September 17, 2015 06:05AM
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.
Subject Author Posted

NGINX + Spark Web UI

mjordan79 September 17, 2015 06:05AM

Re: NGINX + Spark Web UI

B.R. September 19, 2015 06:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready