title: nodejs with ssl (https to https) Error: unable to verify the first certificate
body: <p>i have two projects in the same server, 1st:
  php with nginx in port 443, thats an api rest.
  2nd: nodejs in port 80 this is a consuming of rest api.</p>
  
  <p>1st and 2nd works alone fine and both have a ssl certificate but when i try to access api from node js to api returns exception </p>
  
  <blockquote>
    <p>Error: unable to verify the first certificate</p>
  </blockquote>
  
  <p>if both applications use "http" works fine, and node can access to api rest. to consume api rest in node i use "<a href="https://www.npmjs.com/package/node-rest-client" rel="nofollow">node-rest-client</a>" i try use this args but doesn't work:  </p>
  
  <pre><code>connection:{
          secureOptions: constants.SSL_OP_NO_TLSv1_2,
          ciphers: 'ECDHE-RSA-AES256-SHA:AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM',
          honorCipherOrder: true
      }
  </code></pre>
  
  <p>Does anyone know why this happens? </p>