Nexus server behind an apache2 proxy

the following howto explains how to install a default nexus server behind an apache2 proxy on a debian host.

First install apache and java download nexus and prepare for configuration. You’ll find the latest version of nexus under http://nexus.sonatype.org/downloads/

[codesyntax lang=”bash”]

[/codesyntax]

Change root path of the nexus web application in /usr/local/nexus/conf/plexus.properties from /nexus to /

[codesyntax lang=”bash”]

[/codesyntax]

Then add a new vhost to apache:

[codesyntax lang=”apache”]

[/codesyntax]

Apache needs some additional modules loaded and nexus has to be started too.

[codesyntax lang=”bash”]

[/codesyntax]

After this you should be able to access the nexus server via http://nexus-host:8081/ and http://nexus-host/. The first one is the webapp behind the proxy. Of course you have to replace the hostname or create an appropriate /etc/hosts entry.

As described, this setup is a nexus only host without NameVirtualHost configuration. You can add ServerName and ServerAlias if you want to be able to deploy other vhosts. If you want to share the vhost with other applications, just skip the part with changes in the nexus.properties file or change the value to the wanted path. Then you have to use different lines for proxy configuration. For example, if you want too keep /nexus, you have to use

[codesyntax lang=”bash”]

[/codesyntax]

Leave a Reply