I'm trying to prefix an existing Rails application with a sub-domain, essentially I want the sub-domain to serve the same application.
Right now apache2 serves my application with "www.example.com" or "example.com".
I adjusted my sites-available virtualhost in hopes of allowing for "foo.example.com" or "www.foo.example.com" however both instances are met with a domain not found error. Here is my current VirtualHost in /etc/apache2/sites-available/example.com:
<VirtualHost *:80> ServerName example.com ServerAlias foo.example.com *.example.com www.foo.example.com www.example.com DocumentRoot /home/user/my_app/public <Directory /home/user/my_app/public> AllowOverride all Options -MultiViews </Directory> </VirtualHost>
Any ideas? Note, I realized I probably don't need a wild card sub-domain for what I'm trying to do, I simply added that in as a last-ditch effort.
Edit: The actual domain is virtualrobotgames.com with the desired subdomain being roboteer.virtualrobotgames.com