I’m trying to run nexus3 oss behind a kong repo. This is a trivial task for nearly everything else, but nexus (or maybe jetty) has made it complex.
My sonatype instance runs in kubernetes / nodeport using 8443 (https) endpoint. My kong instance runs on the same server (NOT in kubernetes) and I am using ‘path routing’ so that I can access the repository at https://hostname/nexus/ . Kong routes to (e.g. https://127.0.0.1:30111 which kubernetes routes internally to the sonatype instance).
This all works well for the index page. However apparently sonatype is able to detect the original ip / hostname, and appends its internal port number 8443. So when I “view-source” of the index page I see this:
<html lang="en">
<head>
<title>Nexus Repository Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="description" content="Nexus Repository Manager"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<!--[if lt IE 9]>
<script>(new Image).src="https://172.16.1.1:8443/static/rapture/resources/favicon.ico?_v=3.28.1-01&_e=OSS"</script>
<![endif]-->
Note also that the /nexus/ path is stripped.
How can I use kong and nexus together using path (not hostname) routing?
I’ve been struggling with this for at least a month. If I was using just nginx it would be simple, but I
have to use kong for this.
Thanks for your attention.