Complex Meteor.js deploy: host does not resolve

May 2, 2016 1.7k views
Nginx Deployment DigitalOcean


I have been researching and trying out many different ways to kill my non resolve issues I’m so stuck I can’t but ask if any experienced user can see the issue.

Domain Registrar:
My normal home web-page’s domain is which forwards to an instapage website, but I want a subdomain to redirect (301) to my DO droplet. I added subdomain masked forwarding (HTTP) to my DO IP address, added the three nameservers for in GoDaddy, and added an A record for login that points to the DO IP address.

Deploying Meteor
I follow the this guide
My /etc/nginx/sites-available/myapp.conf file:

server_tokens off;
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
server {
    listen 80 default_server; 
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html; # root is irrelevant
    index index.html index.htm; # this is also irrelevant

    location / {
        rewrite     ^ https://$server_name$request_uri? permanent;
server {
    listen 443 ssl spdy;
    root html;
    index index.html;

    ssl_certificate /etc/nginx/ssl/server.pem;
    ssl_certificate_key /etc/nginx/ssl/server.key;

    ssl_stapling on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 5m;

    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    add_header Strict-Transport-Security "max-age=31536000;";
    if ($http_user_agent ~ "MSIE" ) {
        return 303;
    location / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; # allow websockets
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
        if ($uri != '/') {
            expires 30d;

My /etc/init/myapp.conf:

description "Meteor.js (NodeJS) application"
author "Daniel Speichert <>"
start on started mongodb and runlevel [2345]
stop on shutdown
respawn limit 10 5
setuid myapp
setgid myapp

    export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    export NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript
    export PWD=/home/myapp
    export HOME=/home/myapp
    export BIND_IP=
    export PORT=8080
    export MONGO_URL=mongodb://localhost:27017/myapp
    export ROOT_URL=
    exec node /home/myapp/bundle/main.js >> /home/myapp/myapp.log
end script


Does anyone know why it does not resolve? I can ping the DO droplet’s IP address, but when I do a GET request with chrome it does not resolve (

2 Answers

Name resolution is unrelated to your server configuration and you decided to censor the domain name, so nothing can be done to help.

What is the domain?

  • Thanks, you are right. However after it resolved, it turned out to be a 502 Bad Gateway problem anyway. Is there anything wrong with my setup?

This question is irrelevant, it turned out to be a persistent 502 Bad Gateway error. See here:

Have another answer? Share your knowledge.