2017-09-18 1 views
0

https를 통해 실행되도록 Nexus 3을 설정하려고합니다.https (Ubuntu 16.04)를 통해 Nexus 3을 설정하십시오.

내가 그랬어 :

wget http://download.sonatype.com/nexus/3/latest-unix.tar.gz 

그럼, 추출, 내 SSL 인증서를 추가 할 파일 nexus/etc/jetty/jetty-https.xml을 변경 :

<?xml version="1.0"?> 
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> 
<Configure id="Server" class="org.eclipse.jetty.server.Server"> 

    <!-- 
    ==== HTTPS ==== 
    Set the following inside nexus.properties: 
    application-port-ssl: the port to listen for https connections 
    --> 

    <Ref refid="httpConfig"> 
    <Set name="secureScheme">https</Set> 
    <Set name="securePort"><Property name="application-port-ssl" /></Set> 
    </Ref> 

    <New id="httpsConfig" class="org.eclipse.jetty.server.HttpConfiguration"> 
    <Arg><Ref refid="httpConfig"/></Arg> 
    <Call name="addCustomizer"> 
     <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg> 
    </Call> 
    </New> 

    <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory"> 
    <Set name="KeyStorePath"><Property name="ssl.etc"/>/home/nexus/nexus/ssl/keystore.jks</Set> 
    <Set name="KeyStorePassword">pwd</Set> 
    <Set name="KeyManagerPassword">pwd</Set> 
    <Set name="TrustStorePath"><Property name="ssl.etc"/>/home/nexus/nexus/ssl/myTrustStore</Set> 
    <Set name="TrustStorePassword">pwd</Set> 
    <Set name="EndpointIdentificationAlgorithm">/home/nexus/nexus/ssl/keystore.jks</Set> 
    <Set name="NeedClientAuth"><Property name="jetty.ssl.needClientAuth" default="false"/></Set> 
    <Set name="WantClientAuth"><Property name="jetty.ssl.wantClientAuth" default="false"/></Set> 
    <Set name="ExcludeCipherSuites"> 
     <Array type="String"> 
     <Item>SSL_RSA_WITH_DES_CBC_SHA</Item> 
     <Item>SSL_DHE_RSA_WITH_DES_CBC_SHA</Item> 
     <Item>SSL_DHE_DSS_WITH_DES_CBC_SHA</Item> 
     <Item>SSL_RSA_EXPORT_WITH_RC4_40_MD5</Item> 

     <Item>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</Item> 
     <Item>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</Item> 
     <Item>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</Item> 
     </Array> 
    </Set> 
    </New> 

    <Call name="addConnector"> 
    <Arg> 
     <New id="httpsConnector" class="org.eclipse.jetty.server.ServerConnector"> 
     <Arg name="server"><Ref refid="Server" /></Arg> 
     <Arg name="acceptors" type="int"><Property name="jetty.https.acceptors" default="-1"/></Arg> 
     <Arg name="selectors" type="int"><Property name="jetty.https.selectors" default="-1"/></Arg> 
     <Arg name="factories"> 
      <Array type="org.eclipse.jetty.server.ConnectionFactory"> 
      <Item> 
       <New class="org.sonatype.nexus.bootstrap.jetty.InstrumentedConnectionFactory"> 
       <Arg> 
        <New class="org.eclipse.jetty.server.SslConnectionFactory"> 
        <Arg name="next">http/1.1</Arg> 
        <Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg> 
        </New> 
       </Arg> 
       </New> 
      </Item> 
      <Item> 
       <New class="org.eclipse.jetty.server.HttpConnectionFactory"> 
       <Arg name="config"><Ref refid="httpsConfig" /></Arg> 
       </New> 
      </Item> 
      </Array> 
     </Arg> 

     <Set name="host"><Property name="application-host" /></Set> 
     <Set name="port"><Property name="application-port-ssl" /></Set> 
     <Set name="idleTimeout"><Property name="jetty.https.timeout" default="30000"/></Set> 
     <Set name="soLingerTime"><Property name="jetty.https.soLingerTime" default="-1"/></Set> 
     <Set name="acceptorPriorityDelta"><Property name="jetty.https.acceptorPriorityDelta" default="0"/></Set> 
     <Set name="selectorPriorityDelta"><Property name="jetty.https.selectorPriorityDelta" default="0"/></Set> 
     <Set name="acceptQueueSize"><Property name="jetty.https.acceptQueueSize" default="0"/></Set> 
     </New> 
    </Arg> 
    </Call> 

</Configure> 

내가 파일에 포트 8444 및 부두 - https.xml 추가 nexus.properties

# Jetty section 
application-port=8081 
application-port-ssl=8444 
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-http-redirect-to-https.xml,${jetty.etc}/jetty-requestlog.xml 
nexus-context-path=/ 

# Nexus section 
nexus-edition=nexus-pro-edition 
nexus-features=\ 
nexus-pro-feature 

나는에 nexus/bin/nexus를 연결

내가 /etc/init.d/nexus start

를 실행하지만 난 단지

tcp  0  0 127.0.0.1:43303   0.0.0.0:*    LISTEN  9874/java 

을 얻을 netstat -nlpt 실행 그리고 내가 어디 로그를 찾을 수 이해하지 못하는

... 잠시 후 중지 디버깅하는 방법 ... 어떤 도움을 주시면 감사하겠습니다. 디버깅

답변

0

로그 파일은 $ NEXUS_HOME 내에/데이터/실패에 대한 정보가 nexus.log

내에 있어야

을 당신은 nexus.log 찾아야한다 로그인 request.log

관련 문제