0

I need to connect geth rpc using https://60.248.172.3 in web3.js because my website is running in secure mode(https://example.com) I tried this and got error:

geth --rpc --rpcaddr "https://60.248.172.3"

Fatal: Error starting protocol stack: listen tcp: address https://60.248.172.3:8545: too many colons in address

How can I add https:// in start of my ip(60.248.172.3) using --rpcaddr?

The main issue is chrome browser can't allow web3.js to send ajax post request to http://60.248.172.3:8545 when my site is opened with https://example.com(https)

1

Try to use --rpcaddr 60.248.172.3 and --rpcport 443.

But as far as I know geth does not support SSL protocol. You can set up an Nginx reverse proxy to handle such case.

  • what is difference b/w 8545 and 443? – Muhammad Shahzad Apr 18 '18 at 15:49
  • These are different ports. 443 is usually used for SSL connection. 8545 for RPC interface connection. You can configure your web server to use SSL on 8545 port also if you need. – someart Apr 18 '18 at 16:19
  • can you please provide some example for : ` Nginx reverse proxy to handle such case` – Muhammad Shahzad Apr 18 '18 at 17:15
  • Check the related topic – someart Apr 18 '18 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.