now i have added a second server section , different server_name
directive in nginx.conf serving up the same app but with a different
layout based on controlle rlogic based on the HOST_NAME.
it works locally, but the server still show HOSTNAME from server 1,
hence logic failing...
now i have added a second server section , different server_name
directive in nginx.conf serving up the same app but with a different
layout based on controlle rlogic based on the HOST_NAME.
it works locally, but the server still show HOSTNAME from server 1,
hence logic failing...
I think you need to be a little more explicit on exactly what you mean
by HOSTNAME (or HOST_NAME, you don't seem sure which it is).
Sure: post your nginx config (or a sample version that demonstrates
the problem) along with something showing how you're determining
what requests the Rails app is receiving.
somewhat off the topic - but just want to repeat my delight that HatchBox now handle all this server pain for me!
it’s kinda like heroku - but they’ll configure the server on your choice of host. I use DigitalOcean
I give them a fairly modest amount of money, and they make all this kind of thing very easy.
Adding an extra domain to the app is about three clicks. (app, configuration, type your new domain name, click add) They worry about the ngnix config and all that
I actually have an app like yours which behaves differently according to host. I just have this method in my application controller
my problem is that the slection of th elayout works just fine in
development mode + dns in windows host file ; but no on production
server, it on,y says template not found...