Report this

What is the reason for this report?

Subdomain pointing to regular domain for rails app.

Posted on September 21, 2019

I have a domain registered that’s pointing to my rails app. That’s working all well and good. I decided to add a second rails app that I wanted a subdomain to point to.

I setup up second nginx server block with the server_name set to mysubdomain.mydomain.com and I setup my A record for my subdomain that’s pointing to the same droplet that my domain is pointing to, and I set the root for my second app to the public folder of my seconds rails app (in my /etc/nginx/sites-enabled/secondrailsapp file)

When I enter the subdomain in the url bar, I just get the regular website, as if I was only entering the domain. However, the subdomain is still in the URL so I know it’s setup, it’s just not pointing to the correct app. Any ideas?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.