I’m trying to an admin subdomain to provide some back-end protected access to my site.
I’m seeing lots of rather complex tutorials on how to make subdomains to match any string, but I just want something simple.
In my route, I have
constraints(:subdomain => 'admin') do
resources :admin
root :to => 'admin#index'
end
but this doesn’t resolve.
I’m running my development in an ubuntu virtual machine, so I connect through the ip address, not localhost, so most of the questions where people have problems because of localhost I don’t think apply to me.
Anybody know what I’ve got wrong?
you need to handle this through /etc/hosts and provide a real hostname when connecting like admin.example.com