Dokku domain requires port

November 12, 2014 846 views


I've got Dokku setup to deploy a node.js server. Everything worked while i accessed it with IP:PORT. I've moved to a hostname now but if i go to subdomain.hostname it doesn't work. If i add the port to the end so its subdomain.hostname:port it works.

Any ideas how to fix this?

So far I've:

  • Checked I have a VHOST file in my app folder which contains hostname
  • Checked I have a HOSTNAME file in my app folder which contains hostname
  • Checked my nginx.conf, it looks like this which I think is correct (I've omitted my real IP, URL and PORT)?:
upstream hello-world { server IP:PORT; }
server {
  listen      [::]:80;
  listen      80;
  server_name SUBDOMAIN-URL;
  location    / {
    proxy_pass  http://SUBDOMAIN;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
Be the first one to answer this question.