Parse-server on DigitalOcean - Error 502

Viewed 761

I've followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-migrate-a-parse-app-to-parse-server-on-ubuntu-14-04

All fine, except that when it comes to sending a POST request to the Parse-server, I get an error 502. Here are both POST and GET requests which return a 502 when using https and a 301 when using HTTP:

curl -X POST \
-H "X-Parse-Application-Id: AppId" \
-H "Content-Type: application/json" \
-d '{"score":1337,"playerName":"Sammy","cheatMode":false}' \
https://domain.name/parse/classes/GameScore

curl -H "X-Parse-Application-Id: APPID" http://domain.name/parse/classes/GameScore

I specially wanted to check if

mongod.conf

is fine (mine is the same as the one on the tutorial) and if

/etc/nginx/sites-enabled/default

is also fine.

Here is the log:

2016/03/07 22:11:30 [error] 7288#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: myComputerIP, server: domain.name, request: "GET /parse/classes/GameScore HTTP/1.1", upstream: "http://127.0.0.1:1337/classes/GameScore", host: "domain.name"

Any ideas? Thanks

3 Answers
Related