Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Kfir Ben-Ami
Hello. I’m trying to add a subdomain to my website which is running on ubuntu 14.04
I got a domain: example.com and I want to add a subdomain: recipes.example.com.
I have the following folders:
/var/www/example.com and /var/www/recipes.example.com. Up until now I had the main domain folder only and everything worked just as expected.
In /etc/apache2/sites-available I got my example.com.conf as well as recipes.example.com.conf
here is my recipes.example.com.conf:
<VirtualHost *:80>
ServerAdmin me@example.com
#referring the user to the recipes application
DocumentRoot /var/www/recipes.example.com/public
<Directory /var/www/recipes.example.com/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I’ve added a CNAME entry for my domain:
CNAME: name: recipes, host: @
However, up at this point, when I access recipes.example.com I get see my actual website, which means that apache has loaded the main website’s folder instead of the subdomain folder.
What am I doing wrong?