Note: For more information on the Nexus directories, see https://help.sonatype.com/repomanager3/installation-and-upgrades/directories.
Procedure
- Copy the keystore file into the $install-dir/etc/ssl folder.
- Copy the keystore file into the $install-dir\etc\ssl folder.
-
Edit the $data-dir/etc/nexus.properties file to add the SSL
port and the reference to the SSL configuration file.
# Jetty section application-port=8081 application-port-ssl=8441 application-host=0.0.0.0 nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-https.xml,${jetty.etc}/jetty-requestlog.xml nexus-context-path=/
-
Edit the SSL configuration file
$install-dir/etc/jetty/jetty-https.xml for the certificate
and password:
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory"> <Set name="KeyStorePath"><Property name="ssl.etc"/>/keystore.jks</Set> <Set name="KeyStorePassword">password</Set> <Set name="KeyManagerPassword">password</Set>
The path must just be the name of the keystore file (preceded by a slash) as the file must be in a specific directory.
- Start Nexus and you can login to Nexus URL using SSL port.