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 Answer 1

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.

4
  • what is difference b/w 8545 and 443? Commented Apr 18, 2018 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
    Commented Apr 18, 2018 at 16:19
  • can you please provide some example for : ` Nginx reverse proxy to handle such case` Commented Apr 18, 2018 at 17:15
  • Check the related topic
    – someart
    Commented Apr 18, 2018 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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