bmullan91 / express-subdomain

Super simple subdomain middleware for expressjs
414 stars 49 forks source link

subdomain connection refused #24

Closed shi11 closed 8 years ago

shi11 commented 8 years ago

Hi Brian,

I'm having a tough time debugging an issue. My subdomain works perfectly locally and on my staging server but on the production server I'm getting a ERR_CONNECTION_REFUSED error. Any ideas what could be causing it?

thnx in advance,

Seth

bmullan91 commented 8 years ago

@shi11 sorry to hear you're running into problems. I doubt its express-subdomain's fault if it's working on your staging env, so there isn't much I can help with.

If you do figure it out, let me know! Good luck 😄.

shi11 commented 8 years ago

figured it out - I'm a dumbass. I had added the subdomain to my /etc/hosts file.

I use dev.mysite.com:3000 to mimic www.mysite.com. What I had done was added the subdomain cms.mysite.com to /etc/hosts. I fixed it by making it cms.dev.mysite.com and setting a flag in my app.js.