I have a virtual host configured to run a Ruby on Rails app on Apache and Passenger this way:
<VirtualHost *:80> ServerAdmin email@example.com ServerName staging.domain.co ServerAlias *.doamin.co DocumentRoot /home/ubuntu/staging/current/public
So staging.domain.co, site1.domain.co, site2.domain.co are working find, this is for staging environment. Now I need to add the production environment on the same server. I wold like to add the production environment but I am not sure how to do it. The VPS is running on EC2. Even by using two different servers, there is the issue of the DNS server resolving all subdomains to the current VPS IP. I think the only solution is to use different second level domains:
staging anotherdomain.co production domain.co
What do you think?