I'm running Thin and nginx to serve up my rails app. Everything is working fine, except that the root_url helper method returns "thin" as the domain. So root_url(subdomain: "foo")
in a controller returns foo.thin
instead of foo.mydomain.com
.
The only similar questions on SO advise checking the environment in the controller and setting the host based on that, but I'm sure this is supposed to be handled automatically. Is there something nginx and/or thin isn't passing to Rails that's needed to infer the host?