Having problems with DNS setup

April 1, 2015 1.2k views

Hi and apologize for what it probably a pretty easy question for most, but tbh I'm completely lost with, I've read the tutorial on how to link my droplet to domain name, but still not sure what I have to do to get it to work.

I'm currently running Nodebb, my domain name is setup (wikievolved.org) and pointing to the three DO nameservers, I've also added the domain in the control panel and setup the A name, but still browsing to the url gives an "unable to connect" message.

I spoke to a guy from Nodebb who said "you just need to set up nginx to proxy requests on port 80 to 4567" which means nothing to me, so I've been searching on Google for an answer, with nothing that helps.

Some pointers would be appreciated,

Best, Lee :)

2 Answers

Here is what you'll need to do (This assumes an Ubuntu droplet):

1.) Install nginx on your droplet if you haven't already.

apt-get update
apt-get install nginx

2.) Now open the file /etc/nginx/sites-enabled/default and replace the current Location / section with the following:

location / {
    proxy_pass       http://localhost:4567;
    proxy_set_header Host      $host;
    proxy_set_header X-Real-IP $remote_addr;

3.) Then restart nginx

service nginx restart

Nginx will now be configured to proxy requests from port 80 to your app at port 4567

WOW .... what an amazing service, brilliant, made the changes as you described and it works, thank you so much :)

Have another answer? Share your knowledge.