Sonatype Nexus: proxy using Apache

We run Sonatype Nexus to store all our builds, cache our dependencies, etc. etc. However, I would like to move away from the 8081default installation port and instead host it via SSL through the Apache Proxy. I configured Apache mod_proxyon the proxy to https://myserver.com/nexuscall Nexus. I used the following configuration directives inside my virtual host configuration:

# Configure mod_proxy to be used for proxying URLs on this site to other URLs/ports on this server.
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
  AddDefaultCharset off
  Order deny,allow
  Allow from all
</Proxy>

# Proxy the Sonatype Nexus OSS web application running at http://localhost:8081/nexus
<Location /nexus>
  ProxyPass http://localhost:8081/nexus
  ProxyPassReverse http://localhost:8081/nexus
</Location>

This is similar to the instructions in Starting Nexus behind a proxy server . However, I was not able to clear the "Base URL" setting in Nexus: this did not allow me to leave it blank.

: Nexus URL- HTTPS, .

:

. URL http://myserver.com/nexus URL! Apache mod_proxy, Nexus .

. :

  • : :

    ////. :

    , , , , accept,

    Nexus : 406: , , , , accept, .

  • : . . 8081, .
+4
2

baseUrl Administration- > Server. URL-, , " ".

+4

, , RequestHeader Apache:

RequestHeader set X-Forwarded-Proto "https"

, , , , RequestHeader, Force URL . , OP.

+1

All Articles