GitHub user okoethibm opened a pull request: https://github.com/apache/spark/pull/17455
[Spark-20044][Web UI] Support Spark UI behind front-end reverse proxy using a path prefix ## What changes were proposed in this pull request? Allow to run the Spark web UI behind a reverse proxy with URLs prefixed by a context root, like www.mydomain.com/spark. In particular, this allows to access multiple Spark clusters through the same virtual host, only distinguishing them by context root, like www.mydomain.com/cluster1, www.mydomain.com/cluster2, and it allows to run the Spark UI in a common cookie domain (for SSO) with other services. ## How was this patch tested? New HTML Unit tests in MasterSuite Manual UI testing for master, worker and app UI with an nginx proxy Spark config: spark.ui.reverseProxy=true spark.ui.reverseProxyUrl=/path/to/spark/ nginx config: server { listen 9000; set $SPARK_MASTER http://<spark-host>:8080; location ~ ^(?<prefix>/path/to/spark$) { return 302 $scheme://$host:$server_port$prefix/; } location ~ ^(?<prefix>/path/to/spark)(?<local_path>/.*) { rewrite ^ $local_path break; proxy_pass $SPARK_MASTER; proxy_redirect $SPARK_MASTER $prefix; } } You can merge this pull request into a Git repository by running: $ git pull https://github.com/okoethibm/spark SPARK-20044 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17455.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17455 ---- ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org