title: axios ECONNREFUSED when requesting in a docker-compose service behind nginx reverse proxy
body: <p>I have two docker-compose setup, the main service is an SPA containing:</p>
  
  <ul>
  <li>nginx proxy for a wordpress on port 80</li>
  <li>wordpress + mysql</li>
  <li>expressjs for serving a react app port 6000</li>
  </ul>
  
  <p>This runs behind another docker-compose which is basically an nginx-reverse proxy. </p>
  
  <p>The SPA manages to serve website and connects to backend API via reverse proxy just fine. However, when I try to make a separate https request to the backend api from the server.js I get this message:
  <code>
      { Error: connect ECONNREFUSED 127.0.0.1:443
          at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1121:14)
        errno: 'ECONNREFUSED',
        code: 'ECONNREFUSED',
        syscall: 'connect',
        address: '127.0.0.1',
        port: 443 }
  </code>
  And it's not just axios, plain wget to the backend url gives me connection refused as well.
  A sample for said request:</p>
  
  <p><code>
      axios.put('/wc/v3/orders/934', {
        status: "completed"
      },{
        withCredentials:true,
        auth: {
          username: process.env.REACT_APP_WC_ADMIN_CK_KEY,
          password: process.env.REACT_APP_WC_ADMIN_CS_KEY
        }
      }).then(function (response) {
           console.log(`ok`);
        }).catch(function (error) {
           console.log(error);
        });
  </code></p>
  
  <p>Any one knows what might be the problem here? </p>