-5

any ideia why my node only runs in http? The node keeps running but if you put https in browser the node will not work properly, as it only works properly on http,

  • 1
    If you want `https` to work, then you need to create an `https` server. It would typically run on a different port (usually 443) and require an SSL certificate as part of the server options. If you're only creating an `http` server, then it is expected that it will not work with `https`. – jfriend00 Jun 07 '17 at 02:22
  • In general, you will get a lot more specific help here on stackoverflow if you post the relevant portion of your code (pasted into your question and formatted appropriately). – jfriend00 Jun 07 '17 at 02:26
  • Another alternative is to run your server on `http://127.0.0.1` and then use nginx(or similar) to proxy incoming requests from https to your node app. – ippi Jun 07 '17 at 02:26
  • I already have SSL , and the htacess is pointing to https but when i rode my node while pointing to https the node doesnt work – Pedro Gaspar Jun 07 '17 at 19:15

1 Answers1

0

Configuring Nginx and SSL with Node.js for HTTPS

Please go through the below link and follow all steps

Link

Note: It is mandatory to have Domain Name forwarding request to your working Node IP Address

Ratan Uday Kumar
  • 5,738
  • 6
  • 35
  • 54