title: Nexus repository cache is not getting uploaded with the npm modules
body: <p>My organization does not allow servers with direct access to internet. We have Nexus 3 OSS installed in the offline machine with proxy access to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> enabled. I have tested the flow from our nexus machine to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> and it works fine. Next we have set up npm-proxy repository <a href="https://help.sonatype.com/repomanager3/formats/npm-registry" rel="nofollow noreferrer">as here</a></p>
  
  <p>To access nexus server we have to go through reverse proxy server - which is Apache server(version 2.4) with virtual host redirect to the nexus machine. We have registered a dns alias for the reverse proxy server and redirected to nexus installed service port. We did refer <a href="https://help.sonatype.com/repomanager3/installation/run-behind-a-reverse-proxy" rel="nofollow noreferrer">this</a></p>
  
  <p>Now from my nexus installed machine terminal i placed a very basic package.json and also updated the npm registery to point to our nexus. Next I test the setup with npm install. It works fine. I get node_modules created. However nothing is updated when i browse the repository in nexus. </p>
  
  <p>Any hints on what can be missing or how to troubleshoot will greatly help.</p>
  
  <p><strong>What I tried:</strong></p>
  
  <p>When i set the npm registry to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> with proxy set in .npmrc file i get the node_modules created.</p>
  
  <p>When i change the registry back to point to my company nexus with proxy still active, i get error : <strong>npm ERR! code E502
  npm ERR! 502 Bad Gateway - GET <a href="https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcdk" rel="nofollow noreferrer">https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcdk</a> .</strong></p>
  
  <p>When i delete the proxy (which should be the case as i can reach my company nexus without proxy) i get error: <strong>npm ERR! request to <a href="https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcdk" rel="nofollow noreferrer">https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcdk</a> failed, reason: write EPROTO 140244137531200:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922</strong>:</p>
  
  <p>I am not sure where I am going wrong. </p>
  
  <p><strong>Some more inputs that may help understand my setup:</strong></p>
  
  <p>A bit on company nexus setup:
  Nexus is installed in an offline server. This server is where I am trying all of the above. From this server we have proxy access to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> enabled. We have tested the npm install by directly using this registry with proxy server details and it works fine.</p>
  
  <p>The nexus server can be accessed from user network(browser) using apache reverse proxy. Apache server(version 2.4) is installed on other offline windows server (does not have internet access enabled, however proxy access to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> is enabled). From this server we use virtual host redirect to nexus server. </p>
  
  <p>Below is the rule:
  
      ServerName repos-dev.company.hub
      ProxyPreserveHost On
      SSLEngine on</p>
  
  <pre><code>SSLProxyEngine on
  
      LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  
      ProxyRequests Off
      ProxyPreserveHost On
      RewriteEngine On
      RequestHeader set X-Forwarded-Proto "https"
      AllowEncodedSlashes NoDecode
  
  SSLCertificateFile "D:\certs\repos-dev_company_hub.pem"
  SSLCertificateKeyFile "D:\certs\repos-dev.company.hub.key" 
  SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1
  SSLHonorCipherOrder On
  LogLevel debug
  ProxyPass / http://&lt;nexus server ip:port&gt;/ nocanon
  ProxyPassReverse / &lt;nexus server ip:port&gt;/
  
  
  ErrorLog "logs/repos-error.log"
  CustomLog "logs/repos-access.log" common
  
  AllowEncodedSlashes NoDecode
  </code></pre>
  
  <p></p>
  
  <p>I have checked the access to <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> from my apache server (windows machine) from the browser (need to enable proxy) and it is reachable.</p>
  
  <p>In nexus configurations i have configured my npm-proxy to use <a href="https://registry.npmjs.org" rel="nofollow noreferrer">https://registry.npmjs.org</a> as the registry. I have also enabled the HTTP proxy from the nexus dashboard.</p>
  
  <p><strong>Below is the detailed logs</strong></p>
  
  <pre><code>65 verbose stack FetchError: request to https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcompiler failed, reason: write EPROTO 140311458678592:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:
  65 verbose stack
  65 verbose stack     at ClientRequest.&lt;anonymous&gt; (/opt/node/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
  65 verbose stack     at ClientRequest.emit (events.js:200:13)
  65 verbose stack     at TLSSocket.socketErrorListener (_http_client.js:402:9)
  65 verbose stack     at TLSSocket.emit (events.js:200:13)
  65 verbose stack     at errorOrDestroy (internal/streams/destroy.js:107:12)
  65 verbose stack     at onwriteError (_stream_writable.js:438:5)
  65 verbose stack     at onwrite (_stream_writable.js:459:5)
  65 verbose stack     at internal/streams/destroy.js:49:7
  65 verbose stack     at TLSSocket.Socket._destroy (net.js:593:3)
  65 verbose stack     at TLSSocket.destroy (internal/streams/destroy.js:37:8)
  65 verbose stack     at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:84:12)
  66 verbose cwd /data/npmTest
  67 verbose Linux 3.10.0-693.21.1.el7.x86_64
  68 verbose argv "/opt/node/bin/node" "/opt/node/bin/npm" "install"
  69 verbose node v12.4.0
  70 verbose npm  v6.9.0
  71 error code EPROTO
  72 error errno EPROTO
  73 error request to https://repos-dev.company.hub/repository/npm-proxy/@angular%2fcompiler failed, reason: write EPROTO 140311458678592:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:
  74 verbose exit [ 1, true ]
  </code></pre>
  
  <p>Any help is highly appreciated.</p>