Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws, rpc-wan-ip, nginx as proxy - cant get it to work #43

Open
klemendlabs opened this issue Apr 4, 2018 · 1 comment
Open

aws, rpc-wan-ip, nginx as proxy - cant get it to work #43

klemendlabs opened this issue Apr 4, 2018 · 1 comment

Comments

@klemendlabs
Copy link

klemendlabs commented Apr 4, 2018

I'm using

  • aws ec2 instance with wan elastic ip
  • ubuntu geth node 1.8.2
  • explorer
  • nginx as proxy (a domain and ssl set-up)

app/app.js

var GETH_HOSTNAME       = "localhost";  // put your IP address!
var GETH_RPCPORT        = 8544;                 // for geth --rpcport GETH_RPCPORT

geth node
/usr/bin/geth --rpc --rpcaddr localhost --rpccorsdomain "*" --rpcvhosts "*" --rpcport 8544 --testnet --rpcapi "eth,net,web3,personal"

package.json
"start": "http-server ./app -a localhost -p 8000 -c-1",

Starting up http-server, serving ./app
Available on:
http://localhost:8000

Can't get it to work, the main problem is that I can't get the explorer to connect to node :
Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8544, is it running?

Could be the relatively outdated packages (web3, http-server)?

@sthnaqvi
Copy link

sthnaqvi commented Apr 6, 2018

var GETH_HOSTNAME = "localhost";
replace "localhost" with your IP of ec2 ubuntu instance, if you configure Nginx for port 8544 then replace "http://"+GETH_HOSTNAME+":"+GETH_RPCPORT on line app.js line no 96 web3.setProvider(new web3.providers.HttpProvider("http://"+GETH_HOSTNAME+":"+GETH_RPCPORT));
with your domain name.
if you are still facing a problem mail me at [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants