I'm almost certain this is just my ignorance and expecting this to be an easy fix, but basically mydomain.com:3000 serves the correct content, but mydomain.com does not. Here is what my nginx.conf.default file has:
upstream mydomain {
server 127.0.0.1:3000;
keepalive 8;
}
server {
listen 0.0.0.0:80;
server_name mydomain.com www.mydomain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://mydomain/;
proxy_redirect off;
}
}
I've been following this article, but can't figure out where my error is: http://dailyjs.com/2010/03/15/hosting-nodejs-apps/
(Note: I believe my installation of nginx differs from this as there is no sites-available folder. Instead, I'm editing the nginx.conf.default file because I saw the lines for the localhost server above the ones I've got here.)
Basically, what I want is to be able to visit mydomain.com to load the content, instead of mydomain.com:3000.